summaryrefslogtreecommitdiff
path: root/systems/texlive/tlnet/tlpkg/tlperl/site/lib/HTTP/Request/Common.pm
diff options
context:
space:
mode:
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/tlperl/site/lib/HTTP/Request/Common.pm')
-rw-r--r--systems/texlive/tlnet/tlpkg/tlperl/site/lib/HTTP/Request/Common.pm15
1 files changed, 8 insertions, 7 deletions
diff --git a/systems/texlive/tlnet/tlpkg/tlperl/site/lib/HTTP/Request/Common.pm b/systems/texlive/tlnet/tlpkg/tlperl/site/lib/HTTP/Request/Common.pm
index 838be35a8b..2a5859082f 100644
--- a/systems/texlive/tlnet/tlpkg/tlperl/site/lib/HTTP/Request/Common.pm
+++ b/systems/texlive/tlnet/tlpkg/tlperl/site/lib/HTTP/Request/Common.pm
@@ -3,7 +3,7 @@ package HTTP::Request::Common;
use strict;
use warnings;
-our $VERSION = '6.27';
+our $VERSION = '6.36';
our $DYNAMIC_FILE_UPLOAD ||= 0; # make it defined (don't know why)
@@ -14,6 +14,7 @@ our @EXPORT_OK = qw($DYNAMIC_FILE_UPLOAD DELETE);
require HTTP::Request;
use Carp();
+use File::Spec;
my $CRLF = "\015\012"; # "\r\n" is not portable
@@ -143,7 +144,7 @@ sub form_data # RFC1867
my($file, $usename, @headers) = @$v;
unless (defined $usename) {
$usename = $file;
- $usename =~ s,.*/,, if defined($usename);
+ $usename = (File::Spec->splitpath($usename))[-1] if defined($usename);
}
$k =~ s/([\\\"])/\\$1/g;
my $disp = qq(form-data; name="$k");
@@ -313,17 +314,17 @@ HTTP::Request::Common - Construct common HTTP::Request objects
=head1 VERSION
-version 6.27
+version 6.36
=head1 SYNOPSIS
use HTTP::Request::Common;
$ua = LWP::UserAgent->new;
$ua->request(GET 'http://www.sn.no/');
- $ua->request(POST 'http://somewhere/foo', [foo => bar, bar => foo]);
- $ua->request(PATCH 'http://somewhere/foo', [foo => bar, bar => foo]);
- $ua->request(PUT 'http://somewhere/foo', [foo => bar, bar => foo]);
- $ua->request(OPTIONS 'http://somewhere/foo', [foo => bar, bar => foo]);
+ $ua->request(POST 'http://somewhere/foo', foo => bar, bar => foo);
+ $ua->request(PATCH 'http://somewhere/foo', foo => bar, bar => foo);
+ $ua->request(PUT 'http://somewhere/foo', foo => bar, bar => foo);
+ $ua->request(OPTIONS 'http://somewhere/foo', foo => bar, bar => foo);
=head1 DESCRIPTION