Commit 878d4e6a authored by David Golden's avatar David Golden

remove header field value validation; render undef as empty string

parent 01ebfa2c
......@@ -2,6 +2,11 @@ Release notes for HTTP-Tiny
{{$NEXT}}
[FIXED]
- Empty header fields are now allowed; headers with the 'undef' value
will be rendered as an empty header.
0.045 2014-07-19 23:17:28-04:00 America/New_York (TRIAL RELEASE)
[FIXED]
......
......@@ -1149,8 +1149,7 @@ sub write_header_lines {
$HeaderCase{lc $field_name} = $field_name;
}
for (ref $v eq 'ARRAY' ? @$v : $v) {
die(qq/Invalid HTTP header field value ($field_name): / . $Printable->($_). "\n")
if $_ ne '' && !$_ =~ m/[^\x0D\x0A]/;
$_ = '' unless defined $_;
$buf .= "$field_name: $_\x0D\x0A";
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment