Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: aletellier [...] bigfootinteractive.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 5.800
Fixed in: 5.801



Subject: DYNAMIC_FILE_UPLOAD = 1 in a multipart/form-data POST breaks
Download (untitled) / with headers
text/plain 667b
DYNAMIC_FILE_UPLOAD = 1 in a multipart/form-data POST breaks SCRIPT: use HTTP::Request::Common; use LWP::UserAgent; $HTTP::Request::Common::DYNAMIC_FILE_UPLOAD = 1; my $ulr = 'https://foo.html'; my $hash = { 'data_file' => [ '/anyfile.txt' ], 'filename' => 'anyfile.txt' }; my $ua = LWP::UserAgent->new(); $ua->timeout(2400); my $res = $ua->request( POST $url, 'Content-Type' => 'form-data', Content => $hash ); print $res->as_string; RESULT: 500 Not a SCALAR reference SOLUTION: ( LWP/Protocol/http.pm ) $content_ref = $$content_ref if ref($$content_ref); change to $content_ref = $$content_ref if ref($content_ref) ne 'CODE' && ref($$content_ref);


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.