cURL / Mailing Lists / curl-users / Single Mail


Cookie paths when the query includes /

From: John P. McCaskey <>
Date: Sun, 20 Sep 2009 14:50:16 -0700

A web site I'm querying with CURL expects a URL in which there are unencoded
forward slashes in the query string. I thought that was illegal and all
reserved characters needed to be URL-encoded, but I guess I was wrong. When
I URL-encode, the server script does not behave as desired. OK, so I'll uses
slashes instead of %2F.


But then cookies misbehave in CURL.


The Set-Cookie header does not include a path, so the default must be used.
My browser takes the path up to the last / before the ?. CURL, however, uses
the path up to the last / of the query string. So the wrong path gets
recorded in the cookies file and CURL fails to return a cookie the server is


Is there a way for me to tell CURL to parse that path only up to, and not
including, the query string?




List admin:
Received on 2009-09-20