Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51536 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43338 invoked from network); 25 Feb 2011 11:29:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Feb 2011 11:29:06 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.214.42 mail-bw0-f42.google.com Received: from [209.85.214.42] ([209.85.214.42:50074] helo=mail-bw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EC/81-33691-082976D4 for ; Fri, 25 Feb 2011 06:29:05 -0500 Received: by bwz13 with SMTP id 13so2068493bwz.29 for ; Fri, 25 Feb 2011 03:29:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=LmAK4gZQ4v7IDPb7w32VGwE2oQgLaUrBZNKz/v6dHTg=; b=wvEP8Q5cGHBtArRxbemNiQUI7wbV4mkJ5/hWxOIK6zBIkPSmYzvUQPq6h54KIIxipu c/ag8Krt+q8taUIMEti2itesQQmlkn17nLqw7UWoFZUcikIXcHdiQssfKmek/6lJLFM+ Y5NrJ7A+6sbHBcLJRW04T4hxAa/OiQQ6/82RY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=kqWmzJsV7t29j/RKWbj46Q7vgaG1ldCXPj+oujisLXj1tk/q5q3z7qDppCkOFkYJpU Q1CMy7+007bKgqYwbmeLXR/AROeobQ+3DgTKyvD4LLH7CuimL0feUzf9ChBVYp196+It YcSlwmiWJQGtURUGUk0L99pbJ9CvJdwkp8OVs= MIME-Version: 1.0 Received: by 10.204.14.204 with SMTP id h12mr1916654bka.183.1298633341440; Fri, 25 Feb 2011 03:29:01 -0800 (PST) Received: by 10.204.55.17 with HTTP; Fri, 25 Feb 2011 03:29:01 -0800 (PST) In-Reply-To: References: Date: Fri, 25 Feb 2011 12:29:01 +0100 Message-ID: To: Carsten Wiedmann Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] problem with header() and php trunk From: pierre.php@gmail.com (Pierre Joye) hi Carsten, Thanks for the report and the patch (applied)! Cheers, On Fri, Feb 25, 2011 at 11:36 AM, Carsten Wiedmann w= rote: > 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 cutti= ng > LWS at the end of a header line. > > << Index: SAPI.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- SAPI.c =A0 =A0 =A0(Revision 308566) > +++ SAPI.c =A0 =A0 =A0(Arbeitskopie) > @@ -680,7 +680,7 @@ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0do { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0header_line_len--; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} while(header_line_len && > isspace(header_line[header_line_len-1])); > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 header_line[--header_line_len]=3D'\0'; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 header_line[header_line_len]=3D'\0'; > =A0 =A0 =A0 =A0} > > =A0 =A0 =A0 =A0if (op =3D=3D SAPI_HEADER_DELETE) { > PATCH; > > << --TEST-- > header() function - LWS at end of field-value > --GET-- > > --FILE-- > 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 > > --=20 Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org