Bug #52162 [Opn]: for NSAPI module, custom request header variables with numbers are removed
| From: | srinatar@php.net | Date: | Wed, 23 Jun 2010 18:06:12 +0000 |
| Subject: | Bug #52162 [Opn]: for NSAPI module, custom request header variables with numbers are removed | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-151811@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52162&edit=1
ID: 52162
User updated by: srinatar@php.net
Reported by: srinatar@php.net
-Summary: custom request header variables with numbers are
removed
+Summary: for NSAPI module, custom request header variables with
numbers are removed
Status: Open
Type: Bug
Package: iPlanet related
Operating System: Linux
PHP Version: 5.3.2
New Comment:
mark the bug as specific to a given SAPI only.
Previous Comments:
------------------------------------------------------------------------
[2010-06-23 20:04:46] srinatar@php.net
here is the suggested patch to address this issue
[sn123202@mbelshe]'PHP_5_3'>svn diff sapi/nsapi/nsapi.c
Index: sapi/nsapi/nsapi.c
===================================================================
--- sapi/nsapi/nsapi.c (revision 300702)
+++ sapi/nsapi/nsapi.c (working copy)
@@ -687,7 +687,7 @@
if (value) {
for(p = value + pos; *p; p++) {
*p = toupper(*p);
- if (*p < 'A' || *p >
'Z') {
+ if (!isalnum(*p)) {
*p = '_';
}
}
if no one has any issues, i can commit this patch..
------------------------------------------------------------------------
[2010-06-23 19:02:30] srinatar@php.net
Description:
------------
for example, if u try to request print-header.php (which contains the
following)
<?
print "\nContents of \$_SERVER:\n";
foreach ($_SERVER as $k => $v) {
print " $k = $v\n";
}
print "</pre>\n";
?>
by doing some thing like
$ telnet localhost 80
Trying 192.168.20.126...
Connected to s10u7x.
Escape character is '^]'.
GET /print-header.php HTTP/1.0
X-T3crawler: foobar
u get output as
HTTP_X_T_CRAWLER = foobar -> unexpected result
what do u expect is
HTTP_X_T3_CRAWLER = foobar -> expected result
Expected result:
----------------
HTTP_X_T3_CRAWLER = foobar -> expected result
Actual result:
--------------
u get output as
HTTP_X_T_CRAWLER = foobar -> unexpected result
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52162&edit=1