From:             
Operating system: Ubuntu 10.04
PHP version:      5.3SVN-2010-12-16 (SVN)
Package:          HTTP related
Bug Type:         Bug
Bug description:cURL returns wrong Content-Length after a redirect to a page 
without CL-header

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 bug report at http://bugs.php.net/bug.php?id=53556&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=53556&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=53556&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=53556&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=53556&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=53556&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=53556&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=53556&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=53556&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=53556&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=53556&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=53556&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=53556&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=53556&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=53556&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=53556&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=53556&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=53556&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=53556&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=53556&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=53556&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=53556&r=mysqlcfg

Reply via email to