ID: 48396 Updated by: [email protected] Reported By: kulakov74 at yandex dot ru -Status: Open +Status: Feedback Bug Type: cURL related Operating System: Linux -PHP Version: 5.2.9 +PHP Version: 5.2.6 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: ------------------------------------------------------------------------ [2009-05-26 08:37:42] kulakov74 at yandex dot ru Description: ------------ Sorry, this is not a bug in itself but an addition to the bug 45533 because it was closed and I can't add it there. You can move the message to http://bugs.php.net/bug.php?id=45533. I reconfirm the issue with PHP 5.2.6 cURL Information libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 To make it short here is some output from CURL: HTTP/1.1 302 Moved Temporarily Date: Tue, 26 May 2009 07:55:51 GMT Location: ... ... <HTML> ... </HTML> <----------here is the problem!!! HTTP/1.1 200 OK Set-Cookie: GoogleAccountsLocale_session=en ... Server: GFE/2.0 <html><head><title>Redirecting</title> ... <body ...</body></html> Note how headers and bodies follow each other. Normally I get 2 (or more) chunks of headers and only the last response as the body, but this time I got a mixture. So it DOES depend on the server. In this case I log in to my google account and then go to the gmail link with a PHP-script (don't ask me why :) ). I don't think I will go into the mess of reproducing this with the command line curl, though it might be possible. Note that if I do not set the option CURLOPT_HEADER the problem still remains, but I get 2 bodies merged without headers. Reproduce code: --------------- I can send or provide URL to the code, of course it's not trivial. Expected result: ---------------- See above. Actual result: -------------- See above. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48396&edit=1
