hi Carsten, Thanks for the report and the patch (applied)!
Cheers, On Fri, Feb 25, 2011 at 11:36 AM, Carsten Wiedmann <carsten_st...@gmx.de> wrote: > Am 24.02.2011 23:56, schrieb Carsten Wiedmann: >> >> Oh, this only happens with trunk, but not with e.g 5.3.5. But just see >> the difference: > > OK, this bug was introduced in r301263. It's removing +1 char while cutting > LWS at the end of a header line. > > <<<PATCH > Index: SAPI.c > =================================================================== > --- SAPI.c (Revision 308566) > +++ SAPI.c (Arbeitskopie) > @@ -680,7 +680,7 @@ > do { > header_line_len--; > } while(header_line_len && > isspace(header_line[header_line_len-1])); > - header_line[--header_line_len]='\0'; > + header_line[header_line_len]='\0'; > } > > if (op == SAPI_HEADER_DELETE) { > PATCH; > > <<<TESTPHPT > --TEST-- > header() function - LWS at end of field-value > --GET-- > > --FILE-- > <?php > header('x-headertest: foo '); > var_dump(headers_list()); > ?> > --EXPECTREGEX-- > .*string\(17\) \"x-headertest: foo\".* > TESTPHPT; > > > BTW: > PHP is removing LWS at the end of the field-value, but why is it not > replacing LWS between the field-name: and field-value with one SP? > > Regards, > Carsten > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php