ID:               48396
 User updated by:  kulakov74 at yandex dot ru
 Reported By:      kulakov74 at yandex dot ru
-Status:           Feedback
+Status:           Open
 Bug Type:         cURL related
 Operating System: Linux
 PHP Version:      5.2.6
 New Comment:

Sorry, cannot install PHP on the servers I work with. 
I submitted my comment because the author of the original bug wrote
that he had reproduced the bug with many versions up to 5.2.9, so I
thought 5.2.6 would do. I now have reproduced the problem with 5.2.9 too
(finally found the server with it). 

With Windows, I reproduced this with my "old" PHP 4.4.1. This is
definitely related to the way Google responds, it must be using some
different syntax or something that CURL does not expect. For example my
own http client implementation (using fsockopen()) handles the response
properly.


Previous Comments:
------------------------------------------------------------------------

[2009-05-26 10:01:55] [email protected]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/



------------------------------------------------------------------------

[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

Reply via email to