Bug #53556 [Opn]: cURL returns wrong Content-Length after a redirect to a page without CL-header
| From: | cataphract@php.net | Date: | Thu, 16 Dec 2010 17:24:03 +0000 |
| Subject: | Bug #53556 [Opn]: cURL returns wrong Content-Length after a redirect to a page without CL-header | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-157030@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53556&edit=1
ID: 53556
Updated by: cataphract@php.net
Reported by: michael dot moench at marktjagd dot de
Summary: cURL returns wrong Content-Length after a redirect
to a page without CL-header
Status: Open
Type: Bug
Package: HTTP related
Operating System: Ubuntu 10.04
PHP Version: 5.3SVN-2010-12-16 (SVN)
Block user comment: N
Private report: N
New Comment:
This looks like a problem upstream.
Previous Comments:
------------------------------------------------------------------------
[2010-12-16 13:27:22] michael dot moench at marktjagd dot de
Description:
------------
I have an URL which will redirect me to a second, final URL. The first
response contains a Content-Length-Header, the second does not. If I set
the CURLOPT_FOLLOWLOCATION option, I would expect that the
"download_content_length"-field from curl_getinfo contains the
Content-Length of the final URL, in this case 0, but it contains the
Content-Length of the first Response.
The first Response:
HTTP/1.1 302 Found
Date: Thu, 16 Dec 2010 11:39:31 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Location: http://productdata.download.affili.net/xxx
Set-Cookie: ASP.NET_SessionId=xxx; path=/; HttpOnly
Cache-Control: private
Content-Type: text/html; charset=Windows-1252
Content-Length: 214
The Second Response:
HTTP/1.1 200 OK
Date: Thu, 16 Dec 2010 11:39:32 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Content-Disposition: attachment; filename=xxx.gz
Transfer-Encoding: chunked
Cache-Control: private
Content-Type: application/gzip
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53556&edit=1