#28692 [Opn->Csd]: Bogus character in PCRE + Safemode + WWW-authenticate header error
| From: | iliaa@php.net | Date: | Tue, 08 Jun 2004 13:23:52 +0000 |
| Subject: | #28692 [Opn->Csd]: Bogus character in PCRE + Safemode + WWW-authenticate header error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-60571@lists.php.net to get a copy of this message | ||
ID: 28692
Updated by: iliaa@php.net
Reported By: jg at b-one dot net
-Status: Open
+Status: Closed
Bug Type: Unknown/Other Function
Operating System: Linux (Debian)
PHP Version: 4CVS-2004-06-08 (stable)
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2004-06-08 11:52:56] jg at b-one dot net
Description:
------------
A bogus character (a nul before \r\n) is returned from
header('WWW-Authenticate: Basic realm="ABC"');
Which causes mod_fcgi to "internal server error".
It only happens with safemode and pcre-regexp
Reproduce code:
---------------
<?
header("HTTP/1.1 401 Unauthorized");
header("WWW-Authenticate: Basic realm=\"ABC\"");
?>
Expected result:
----------------
"In emacs display"
Status: 401^M
Content-type: text/html^M
X-Powered-By: PHP/4.3.7^M
WWW-Authenticate: Basic realm="ABC-1000"^M
^M
Actual result:
--------------
Status: 401^M
Content-type: text/html^M
X-Powered-By: PHP/4.3.7^M
WWW-Authenticate: Basic realm="ABC-1000"^@^M
^M
Notice ^@ in output.
Hexdump of last part.
3130 3030 2200 0d0a 0d0a
1000" NULL \r\n\r\n
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28692&edit=1