diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/HTTP/Response.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/HTTP/Response.pm | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/Master/tlpkg/tlperl/lib/HTTP/Response.pm b/Master/tlpkg/tlperl/lib/HTTP/Response.pm index b60f06fc09a..8bdb1c5bd1e 100644 --- a/Master/tlpkg/tlperl/lib/HTTP/Response.pm +++ b/Master/tlpkg/tlperl/lib/HTTP/Response.pm @@ -2,7 +2,7 @@ package HTTP::Response; require HTTP::Message; @ISA = qw(HTTP::Message); -$VERSION = "5.836"; +$VERSION = "6.03"; use strict; use HTTP::Status (); @@ -143,12 +143,8 @@ sub filename } require Encode; - require encoding; - # This is ugly use of non-public API, but is there - # a better way to accomplish what we want (locally - # as-is usable filename string)? - my $locale_charset = encoding::_get_locale_encoding(); - Encode::from_to($encfile, $charset, $locale_charset); + require Encode::Locale; + Encode::from_to($encfile, $charset, "locale_fs"); }; $file = $encfile unless $@; @@ -221,10 +217,11 @@ sub is_error { HTTP::Status::is_error (shift->{'_rc'}); } sub error_as_HTML { - require HTML::Entities; my $self = shift; my $title = 'An Error Occurred'; - my $body = HTML::Entities::encode($self->status_line); + my $body = $self->status_line; + $body =~ s/&/&/g; + $body =~ s/</</g; return <<EOM; <html> <head><title>$title</title></head> @@ -395,7 +392,7 @@ This constructs a new response object by parsing the given string. =item $r->code( $code ) This is used to get/set the code attribute. The code is a 3 digit -number that encode the overall outcome of a HTTP response. The +number that encode the overall outcome of an HTTP response. The C<HTTP::Status> module provide constants that provide mnemonic names for the code attribute. |