ID:               45533
 User updated by:  signe at cothlamadh dot net
 Reported By:      signe at cothlamadh dot net
 Status:           Bogus
 Bug Type:         cURL related
 Operating System: FreeBSD 7.0
 PHP Version:      5.2.6
 Assigned To:      pajoye
 New Comment:

You don't understand the issue at all.  The issue is not the headers,
it's that CONTENT from the redirect is included in the output, and
shouldn't be.

Please fully read the original description.

Output sent from the server during the 3xx response should not be
included in the output given to the user.  A server response like this:

"
HTTP/1.1 302 Found
Location: http://www.example.com/

This document has moved to http://www.example.com

HTTP/1.1 200 Found

This is the output from the new document.
"

Should not yield output from PHP that says:

"
This document has moved to http://www.example.com
This is the output from the new document.
"

The 302 content is supposed to be ignored.  CURL does this properly,
but in some circumstances, PHP does NOT.  As I detail in the original
issue report, the issue is WORSE when headers are turned on, because the
content is included between the headers, and is impossible to parse out
using the header and body length values returned from curl_getinfo()


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

[2009-05-03 22:06:29] paj...@php.net

If you ask to include the header in the output, you will get them.
Suppress this line:
curl_setopt($cUrl, CURLOPT_HEADER, true);

The same applies to the cmd line:

curl -i -L http://www.crn.com/rss/cisco/index.xml
vs
curl -L http://www.crn.com/rss/cisco/index.xml

No bug > bogus.

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

[2009-02-03 05:09:01] satishpalasa at hotmail dot com

I am facing the same problem the header content is not recorded. will
there be any problem with this.

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

[2008-08-07 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

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

[2008-07-30 18:57:33] j...@php.net

When you can provide a script that reproduces this problem every time,
give us feedback.

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

[2008-07-17 00:17:50] signe at cothlamadh dot net

I didn't try before reporting, and since they've made a modification,
my one known verification site is lost.

I saw this bug in a previous version of php (5.1.2, I believe) and at
that point in time, I couldn't replicate it with curl commandline. I
upgraded to 5.2.3 (along with a newer libcurl) on that particular server
and wasn't able to reproduce it after the upgrade so I didn't report it
at the time.

I need to try to create a redirect script that can cause the behavior -
until I do, no, I can't reproduce it in either PHP or curl.

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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/45533

-- 
Edit this bug report at http://bugs.php.net/?id=45533&edit=1

Reply via email to