From:             hgs at cs dot columbia dot edu
Operating system: Centos 5
PHP version:      5.3.15
Package:          HTTP related
Bug Type:         Bug
Bug description:getResponseCode and getResponseInfo disagree on code

Description:
------------
For the web site http://istt2012.comvt.org (which has one redirection), 
getResponseCode returns 302, while getResponseInfo() returns a
response_code field 
of 200. In both cases, the documentation indicates that the final (last)
response 
code, presumably 200, should be returned.

Test script:
---------------
$url = "http://istt2012.comvt.org";;
   $r = new HttpRequest($url, HttpRequest::METH_GET);
    $r->setOptions(array(
       'redirect' => 10,
       'timeout' => 10,
       'dns_cache_timeout' => 5));
    try {
      $r->send();
      $rc = $r->getResponseCode();
      $ri = $r->getResponseInfo();
    }

Expected result:
----------------
$rc = 200;
$ri['response_code'] = 200


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

Reply via email to