curl-library
Re: Malformed/Non-standard Set-Cookie or libcurl bug?
Date: Fri, 17 Apr 2009 22:24:35 +0200 (CEST)
On Fri, 17 Apr 2009, Marco Toldo wrote:
> I'm dealing with an HTTP reply from a server which cause libcurl to block
> without getting any response data from it. I tried with verbose mode too but
> program blocks after request is sent.
Try CURLOPT_DEBUGFUNCTION to get to see exactly what it sent/received at the
point it stops.
And you forgot to mention what libcurl version on what platform you're using.
> I thought it was a communication problem and tried to "sniff" data traffic
> with wireshark but the HTTP response is correctly received so I thought
> something strange must happen while libcurl parses HTTP header.
> I analyzed trace provided by wireshark and found a "Set-Cookie" line a
> bit strange (at least for me):
> Set-Cookie: JSESSIONID=F44D3CB5A7CA1A236802F4DE80B956EC; Path=/\r\n\r\n
>
> I'm wondering whether the above line is compliant with the standard or not
> (especially what had been sent from the server after the ';' ). If not,
> could this be the reason why the program blocks?
It may look funny to a casual reader, and I'd be surprised if the server
really has a path named '/\r\n\r\n', but libcurl doesn't mind much.
I tried it just now and it worked fine for me.
I don't think that header is the reason for the problems you experience.
-- / daniel.haxx.seReceived on 2009-04-17