Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Default HTTP version added.

  • Loading branch information...
commit adb5e864c91741a981e149a8adb921327fa8762b 1 parent e2b17bd
@supernovus supernovus authored
Showing with 3 additions and 0 deletions.
  1. +2 −0  .gitignore
  2. +1 −0  lib/HTTP/Easy.pm
View
2  .gitignore
@@ -1,2 +1,4 @@
+Makefile
+blib
*.swp
*~
View
1  lib/HTTP/Easy.pm
@@ -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 //= '';
Please sign in to comment.
Something went wrong with that request. Please try again.