Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: rcasey [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 5.803
Fixed in: (no value)

Attachments


Subject: HTTP::Response message
Download (untitled) / with headers
text/plain 491b
Currently, the as_string method of HTTP::Response includes the HTTP status message (through HTTP::Status based upon the HTTP response code) in the status line irrespective of whether an alternate message has been defined. This is problematic in that it does not readily allow inheritance and extension of the HTTP::Response class for HTTP-like communication protocols, such as RTSP. Attached is a simple patch which includes the HTTP status message only if no alternate message is defined.
diff -Naur libwww-perl-5.803.orig/lib/HTTP/Response.pm libwww-perl-5.803/lib/HTTP/Response.pm --- libwww-perl-5.803.orig/lib/HTTP/Response.pm 2004-12-12 02:13:22.000000000 +1100 +++ libwww-perl-5.803/lib/HTTP/Response.pm 2005-10-04 16:13:09.926053392 +1000 @@ -112,8 +112,7 @@ my $status_line = "$code"; my $proto = $self->protocol; $status_line = "$proto $status_line" if $proto; - $status_line .= " ($status_message)" if $status_message ne $message; - $status_line .= " $message"; + $status_line .= length $message ? " $message" : " $status_message"; return join($eol, $status_line, $self->SUPER::as_string(@_)); }


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.