Permalink
Browse files

Default HTTP version added.

  • Loading branch information...
1 parent e2b17bd commit adb5e864c91741a981e149a8adb921327fa8762b @supernovus committed Sep 26, 2011
Showing with 3 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +1 −0 lib/HTTP/Easy.pm
View
@@ -1,2 +1,4 @@
+Makefile
+blib
*.swp
*~
View
@@ -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 //= '';

0 comments on commit adb5e86

Please sign in to comment.