cURL / Mailing Lists / curl-library / Single Mail


Re: Malformed/Non-standard Set-Cookie or libcurl bug?

From: Marco Toldo <>
Date: Fri, 17 Apr 2009 22:44:10 +0200

I fount it!

The problem was related to the request (which is a POST to a server page).
POST is an usual request to a server page (without actual form data
posted) in the form:
POST /ServerPage.jsp?someKey=someValue&someOtherKey=someOtherValue...

I tried to force setting CURLOPT_POSTFIELDS to "" (empty string) and
now everything works correctly.

Thanks for the help.

2009/4/17, Daniel Stenberg <>:
> 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.
> --
> /
Received on 2009-04-17