Chilkat CkHttpResponse header() Method is Buggy

45 Views Asked by At

Assume the following HTTP response with the Date header (could be any other header) starting with a space:

HTTP/1.1 200 OK
Server: Microsoft-IIS/10.0
 Date: Sun, 29 Feb 2010 15:14:06 GMT
Content-Length: 0

Querying a server with such a response using the following Chilkat code snippet,

// other stuff
CkHttpResponse* resp;
// other stuff
std::cout << resp->header();

yields this result:

Server: Microsoft-IIS/10.0 Date: Sun, 29 Feb 2010 15:14:06 GMT
Content-Length: 0

The header() parser is appending the Date header to the value of the previous header, and in this case, the Server header.

And if the Date header happens to be the first in the list of headers, then the header() parser trims the leading space.

Note: I've tested it with the latest version, v9.5.0.97.

0

There are 0 best solutions below