Skip Menu |

This queue is for tickets about the libwww-perl CPAN distribution.

Report information
The Basics
Id: 18887
Status: resolved
Priority: 0/
Queue: libwww-perl

People
Owner: Nobody in particular
Requestors: sasao [...] yugen.org
Cc:
AdminCc:

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



Subject: Content-Disposition header problem with HTTP::Request::Common
libwww-perl-5.805 module HTTP::Request::Common.pm, line 138: $disp .= qq(; filename="$usename") if $usename; $usename contains file name without path, then the module doesn't generate filename attribute of Content-Disposition header when $usename == '0'. That makes serious problem to some PHP programs. PHP core generates follwing 3 global hash variables before starting script: $_GET $_POST $_FILES. When some part of request contains filename attribute, PHP core adds its part to $_FILES. Otherwise to $_POST. # test code $req = POST $url, Content_Type => 'form-data', Content => [ 'file' => ['foo/bar/0']]; # header with problem Content-Disposition: form-data; name="file" # correct header Content-Disposition: form-data; name="file"; filename="0"
Patch applied. Will be fixed in LWP-5.811.