cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

RE: meaningless characters & cookie problem

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 21 Feb 2003 16:38:27 +0100 (CET)

On Fri, 21 Feb 2003, Cenk Uysal wrote:

> i have no chance to use the tool from command line. so i dont know if
> it runs ok from there.

Then I'm afraid we're reaching the end of what I can do to help. I'm totally
lost in PHP land.

> i think theres a problem about encoding. curl can not encode the chunk
> data.

curl *decodes* the data when it receives it.

And I've not yet seen a single report show a bug in the chunky decoder during
the two years it has existed and been used, so I seriously doubt that is the
problem.

> because when i open the same url by fopen command of php, everthing is ok.

And the requests and responses look exactly the same when PHP's fopen code
does the operation? I seriously doubt that...

You could run a network analyzer like ethereal or something to find out more
details of what is actually being transfered, and that could be used to
further track this down.

You could even do it using telnet and save the output to a file and show us.

> the url uses java server. i dont know if there is any relationship with it.

HTTP should be HTTP no matter what language that was used to write one side
of the implementation ;-) But of course, if they break the standard and do
weird HTTP then it might matter and curl might be confused. I need more
details from you in order to figure out if this really could be the case.

> i have one more question. i try to get the cookie data by CURLOPT_COOKIEJAR
> and write this data to a file. i wonder how can i see the content of that
> cookie file?

Load the file into your favourite text editor!

> in other words, where does curl saves cooki files when we save them by
> CURLOPT_COOKIEJAR option?

You give it the file name where it stores the cookies. libcurl can't possibly
know where you want it.

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
Received on 2003-02-21