[Rt-commit] r5693 - HTTP-Server-Simple/lib/HTTP/Server
audreyt at bestpractical.com
audreyt at bestpractical.com
Fri Aug 4 08:30:36 EDT 2006
Author: audreyt
Date: Fri Aug 4 08:30:35 2006
New Revision: 5693
Modified:
HTTP-Server-Simple/lib/HTTP/Server/Simple.pm
Log:
* HTTP::Server::Simple didn't handle the case where query string is 0:
/foo?0
was parsed as:
/foo
* Also squash a warning on verbless (malformed) HTTP requests.
Modified: HTTP-Server-Simple/lib/HTTP/Server/Simple.pm
==============================================================================
--- HTTP-Server-Simple/lib/HTTP/Server/Simple.pm (original)
+++ HTTP-Server-Simple/lib/HTTP/Server/Simple.pm Fri Aug 4 08:30:35 2006
@@ -305,7 +305,7 @@
$self->setup(
method => $method,
protocol => $proto,
- query_string => ( $query_string || '' ),
+ query_string => ( defined($query_string) ? $query_string : '' ),
request_uri => $request_uri,
path => $file,
localname => $self->host,
@@ -624,7 +624,7 @@
sub valid_http_method {
my $self = shift;
- my $method = shift;
+ my $method = shift or return 0;
return $method =~ /^(?:GET|POST|HEAD|PUT|DELETE)$/;
}
More information about the Rt-commit
mailing list