Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: libwwwperl [...] public.kliegman.com
Cc:
AdminCc:

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



Subject: Problem with multibyte characters and file attachments for uploads
Download (untitled) / with headers
text/plain 1.1k
Perl version 5.6.1 using libwww-perl-5.802 (older libwww's showed this problem as well). Unfortunately can't produce full test code right now but will if necessary (the failure case relies on an externally received multibyte string) (really sorry). To reproduce: - Retrieve/create a multibyte string - Do a multipart/form-data post which includes the multibyte string as a parameter and a file upload (snippet below). - When uploaded, the multipart headers will be correct but the actual data transferred will be corrupted. - Forcing the string parameter to 7-bit fixes the problem: use Unicode::String qw(utf8); $mb = utf8($mb)->utf7; my $ua = LWP::UserAgent->new; my $req = POST("$url", Content_Type => 'multipart/form-data', Content => [ 'upload' => [$file,$name,'Content_Type'=>'image/jpeg'], 'mb' => "$mb", ], ); Other information: The code was executed by the same script using SOAP::Lite which had the keepalive patch applied -- this may have affected things. The value passed as a parameter ($mb in the above snippet) came directly from a SOAP::SOM->ValueOf("//...") call. Again - sorry about the lack of a working test case.
Download (untitled) / with headers
text/plain 113b
Show quoted text
> Again - sorry about the lack of a working test case.
Submit a testcase or nobody will be able to do anything.
Download (untitled) / with headers
text/plain 1.2k
On Tue Dec 07 17:40:29 2004, guest wrote: Show quoted text
> Perl version 5.6.1 using libwww-perl-5.802 (older libwww's showed
this Show quoted text
> problem as well). > > Unfortunately can't produce full test code right now but will if > necessary (the failure case relies on an externally received > multibyte string) (really sorry). > > To reproduce: > - Retrieve/create a multibyte string > - Do a multipart/form-data post which includes the multibyte string > as a parameter and a file upload (snippet below). > - When uploaded, the multipart headers will be correct but the > actual data transferred will be corrupted. > - Forcing the string parameter to 7-bit fixes the problem: use > Unicode::String qw(utf8); $mb = utf8($mb)->utf7; > > my $ua = LWP::UserAgent->new; > my $req = POST("$url", > Content_Type => 'multipart/form-data', > Content => [ > 'upload' =>
[$file,$name,'Content_Type'=>'image/jpeg'], Show quoted text
> 'mb' => "$mb", > ], > ); > > > Other information: > The code was executed by the same script using SOAP::Lite which had > the keepalive patch applied -- this may have affected things. The > value passed as a parameter ($mb in the above snippet) came > directly from a SOAP::SOM->ValueOf("//...") call. > > Again - sorry about the lack of a working test case.
RT-Send-CC: ruzsa.balazs [...] interware.co.hu
Download (untitled) / with headers
text/plain 189b
I was just reviewing the Debian bug reports for this package and this seems quite similar to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521177. There is some actual sample code there.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.