zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #09347
[Bug 996593] [NEW] http client throws error with no content-type header in http response
Public bug reported:
in modules/com/zorba-xquery/www/modules/http-
client.xq.src/http_response_parser.cpp the function
HttpResponseParser::parse() throws an error if the response doesn't
contain a content-type. In this case theCurrentCharset is "".
the surprising part is that in the following code
transcode::is_necessary("") returns true and an icu_streambuf is created
internally with an empty charset:
if ( transcode::is_necessary( theCurrentCharset.c_str() ) ) {
lStream.reset(
new transcode::stream<std::istream>(
theCurrentCharset.c_str(), theStreamBuffer
)
);
}
in the constructor of the icu_streambuf (src/util/icu_streambuf.cpp) the
following code throws the error:
external_conv_( no_conv_ ? nullptr : create_conv( charset ) )
the correct behavior would be if the http-client would not throw an
error if the content-type header is missing.
** Affects: zorba
Importance: Medium
Assignee: Paul J. Lucas (paul-lucas)
Status: New
** Tags: incorrect-result
--
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/996593
Title:
http client throws error with no content-type header in http response
Status in Zorba - The XQuery Processor:
New
Bug description:
in modules/com/zorba-xquery/www/modules/http-
client.xq.src/http_response_parser.cpp the function
HttpResponseParser::parse() throws an error if the response doesn't
contain a content-type. In this case theCurrentCharset is "".
the surprising part is that in the following code
transcode::is_necessary("") returns true and an icu_streambuf is
created internally with an empty charset:
if ( transcode::is_necessary( theCurrentCharset.c_str() ) ) {
lStream.reset(
new transcode::stream<std::istream>(
theCurrentCharset.c_str(), theStreamBuffer
)
);
}
in the constructor of the icu_streambuf (src/util/icu_streambuf.cpp)
the following code throws the error:
external_conv_( no_conv_ ? nullptr : create_conv( charset ) )
the correct behavior would be if the http-client would not throw an
error if the content-type header is missing.
To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/996593/+subscriptions
Follow ups
-
[Bug 996593] Re: http client throws error with no content-type header in http response
From: Dana Florescu, 2012-06-13
-
[Bug 996593] Re: http client throws error with no content-type header in http response
From: Paul J. Lucas, 2012-05-10
-
[Bug 996593] Re: http client throws error with no content-type header in http response
From: Paul J. Lucas, 2012-05-09
-
[Bug 996593] Re: http client throws error with no content-type header in http response
From: Matthias Brantner, 2012-05-09
-
[Bug 996593] Re: http client throws error with no content-type header in http response
From: Paul J. Lucas, 2012-05-09
-
[Bug 996593] Re: http client throws error with no content-type header in http response
From: Matthias Brantner, 2012-05-09
-
[Bug 996593] Re: http client throws error with no content-type header in http response
From: Paul J. Lucas, 2012-05-09
-
[Bug 996593] Re: http client throws error with no content-type header in http response
From: Paul J. Lucas, 2012-05-09
-
[Bug 996593] Re: http client throws error with no content-type header in http response
From: Paul J. Lucas, 2012-05-08
-
[Bug 996593] Re: http client throws error with no content-type header in http response
From: Paul J. Lucas, 2012-05-08
-
[Bug 996593] Re: http client throws error with no content-type header in http response
From: Dennis Knochenwefel, 2012-05-08
-
[Bug 996593] Re: http client throws error with no content-type header in http response
From: Paul J. Lucas, 2012-05-08
-
[Bug 996593] Re: http client throws error with no content-type header in http response
From: Paul J. Lucas, 2012-05-08
-
[Bug 996593] Re: http client throws error with no content-type header in http response
From: Dennis Knochenwefel, 2012-05-08
-
[Bug 996593] [NEW] http client throws error with no content-type header in http response
From: Dennis Knochenwefel, 2012-05-08
References