Skip to content
Browse files

A bit of cleanup on teodozjan++'s workaround.

  • Loading branch information...
1 parent 0f2ac80 commit f4d84a707d27f8ba84da7a9cfeb95e3de11ccc58 Timothy Totten committed Mar 25, 2013
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/HTTP/Easy.pm6
View
9 lib/HTTP/Easy.pm6
@@ -36,7 +36,7 @@ method connect (:$port=$.port, :$host=$.host)
:localhost($host),
:localport($port),
:listen(1),
- :input-line-separator("\r\n\r\n")
+ :input-line-separator(CRLF)
);
}
@@ -58,7 +58,10 @@ method run
## This is temporary workaound
# Second get is needed looks like bug in rakudo.
# We just go along with that
- say "It is cut here\n------->\n", $preamble, "\n<---------";
+ if $.debug
+ {
+ message("Read preamble:\n\n$preamble\n\n--- End of preamble.");
+ }
$preamble ~= $!connection.get;
## End of work around.
my @headers = $preamble.split("\r\n");
@@ -71,8 +74,6 @@ method run
}
message($request);
-
-
if $.debug { message("Finished parsing headers: "~@headers.perl); }
my ($method, $uri, $protocol) = $request.split(/\s/);
if (!$protocol) { $protocol = DEFAULT_PROTOCOL; }

0 comments on commit f4d84a7

Please sign in to comment.
Something went wrong with that request. Please try again.