From:             noxter at web dot de
Operating system: Windows 2000
PHP version:      4.3.2
PHP Bug Type:     CGI related
Bug description:  header("HTTP/1.0 401 Authorization Required"); faild

The follow example failed by php as common gateway interface application.
This problem is common and not specified of a server. Testing with apache,
iis, devwex ... .  The option cgi.rfc2616_headers = 1 is setting in the
php.ini.

<?
    header("HTTP/1.0 401 Authorization Required");
    header("WWW-Authenticate: Basic realm=\"example\"");
?>

the response of Server :

    HTTP/1.1 200 OK
    Server: Microsoft-IIS/5.0
    Date: Fri, 30 May 2003 17:04:01 GMT
    (null)
    Content-type: text/html
    X-Powered-By: PHP/4.3.2
    WWW-Authenticate: Basic realm="example"

the respone of CGI:

    (null)
    Content-type: text/html
    X-Powered-By: PHP/4.3.2
    WWW-Authenticate: Basic realm="example"
    ...

the respone correct is:

    HTTP/1.0 401 Authorization Required
    Content-type: text/html
    X-Powered-By: PHP/4.3.2
    WWW-Authenticate: Basic realm="example"
    ...


-- 
Edit bug report at http://bugs.php.net/?id=23902&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=23902&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=23902&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=23902&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=23902&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=23902&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=23902&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=23902&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=23902&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=23902&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=23902&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23902&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=23902&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=23902&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=23902&r=gnused

Reply via email to