Skip Menu |
 

This queue is for tickets about the HTTP-Message CPAN distribution.

Report information
The Basics
Id: 105787
Status: resolved
Priority: 0/
Queue: HTTP-Message

People
Owner: Nobody in particular
Requestors: blue [...] thisisnotmyrealemail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 6.07
Fixed in: 6.08



Subject: warning when using undef as value in post with form_data
Download (untitled) / with headers
text/plain 471b
This was not an issue prior to version 6.07. Undef is supposed to be a valid value for content, but it now results in the following warning only when the content_type is set to form-data: Use of uninitialized value $v in concatenation (.) or string at .../HTTP/Request/Common.pm line 142 Example snippet: my $res = $ua->post( 'https://www.google.com/', content_type => "multipart/form-data; boundary=----1234", content => [ a => 1, b => undef ], );
From: blue [...] thisisnotmyrealemail.com
Download (untitled) / with headers
text/plain 688b
On Thu Jul 09 21:39:57 2015, blue wrote: Show quoted text
> This was not an issue prior to version 6.07. > Undef is supposed to be a valid value for content, but it now results > in the following warning only when the content_type is set to form- > data: > > Use of uninitialized value $v in concatenation (.) or string at > .../HTTP/Request/Common.pm line 142 > > Example snippet: > > my $res = $ua->post( > 'https://www.google.com/', > content_type => "multipart/form-data; boundary=----1234", > content => [ a => 1, b => undef ], > );
This looks like it's because the warnings pragma was enabled in this release. Adding something like $v = '' unless defined $v; should fix it.
Apologies! 6.08 has been uploaded.


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.