Skip to content

Commit

Permalink
Default HTTP version added.
Browse files Browse the repository at this point in the history
  • Loading branch information
supernovus committed Sep 26, 2011
1 parent e2b17bd commit adb5e86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,2 +1,4 @@
Makefile
blib
*.swp
*~
1 change: 1 addition & 0 deletions lib/HTTP/Easy.pm
Expand Up @@ -20,6 +20,7 @@ class HTTP::Easy {
my @request = split("\x0D\x0A", $received);
my $request = shift @request;
my ($method, $uri, $protocol) = $request.split(/\s/);
if (!$protocol) { $protocol = 'HTTP/1.1'; }
unless $method eq any(<GET POST HEAD PUT DELETE>) { die "unknown HTTP method"; }
my ($path, $query) = $uri.split('?', 2);
$query //= '';
Expand Down

0 comments on commit adb5e86

Please sign in to comment.