Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 64554
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: MARKSTOS [...] cpan.org
Requestors: ntyni [...] iki.fi
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: header() newlines bug since 3.50
Since 3.49, this has been documented to work: like(CGI::header( -ingredients => "ham\neggs\nbacon" ), qr#Ingredients: ham\n eggs\n bacon#) However, it broke with 3.50 which doesn't add the leading spaces anymore, and 3.51, which bails out with "Invalid header value contains a newline not followed by whitespace".
RT-Send-CC: yanick.champoux [...] gmail.com, lincoln.stein [...] gmail.com
On Thu Jan 06 15:24:33 2011, ntyni@iki.fi wrote: Show quoted text
> Since 3.49, this has been documented to work: > > like(CGI::header( -ingredients => "ham\neggs\nbacon" ), > qr#Ingredients: ham\n eggs\n bacon#) > > However, it broke with 3.50 which doesn't add the leading spaces > anymore, and 3.51, which bails out with "Invalid header value contains
a Show quoted text
> newline not followed by whitespace".
Thanks for the report. I think the plan at this point is to update the documentation to quit declaring that this works. This incompatible change should have been highlighted better in the Changes file. Initially, we wanted to support values like, but it was more challenging to do safely than initially realized, while also extremely rare, and no particularly multi-line behavior was documented before.
I've patched this docs for this now if you want to take a look: https://github.com/markstos/CGI.pm/commit/ea947874449fdc7254980dab0ba662 4867f7fda1 Mark On Tue Jan 11 16:19:43 2011, MARKSTOS wrote: Show quoted text
> On Thu Jan 06 15:24:33 2011, ntyni@iki.fi wrote:
> > Since 3.49, this has been documented to work: > > > > like(CGI::header( -ingredients => "ham\neggs\nbacon" ), > > qr#Ingredients: ham\n eggs\n bacon#) > > > > However, it broke with 3.50 which doesn't add the leading spaces > > anymore, and 3.51, which bails out with "Invalid header value
contains Show quoted text
> a
> > newline not followed by whitespace".
> > Thanks for the report. I think the plan at this point is to update the > documentation to quit declaring that this works. This incompatible > change should have been highlighted better in the Changes file. > > Initially, we wanted to support values like, but it was more
challenging Show quoted text
> to do safely than initially realized, while also extremely rare, and
no Show quoted text
> particularly multi-line behavior was documented before.
Subject: released in 3.52
Thanks for your contribution. It was addressed in the 3.52 release of CGI.pm, just uploaded.