diff --git a/lib/Mojo/Message/Request.pm b/lib/Mojo/Message/Request.pm index 46390b4055..ba8be12794 100644 --- a/lib/Mojo/Message/Request.pm +++ b/lib/Mojo/Message/Request.pm @@ -272,9 +272,9 @@ Mojo::Message::Request - HTTP request # Parse my $req = Mojo::Message::Request->new; - $req->parse("GET /foo HTTP/1.0\x0a\x0d"); - $req->parse("Content-Length: 12\x0a\x0d\x0a\x0d"); - $req->parse("Content-Type: text/plain\x0a\x0d\x0a\x0d"); + $req->parse("GET /foo HTTP/1.0\x0d\x0a"); + $req->parse("Content-Length: 12\x0d\x0a"); + $req->parse("Content-Type: text/plain\x0d\x0a\x0d\x0a"); $req->parse('Hello World!'); say $req->method; say $req->headers->content_type; diff --git a/lib/Mojo/Message/Response.pm b/lib/Mojo/Message/Response.pm index f937f01509..a90d8f199a 100644 --- a/lib/Mojo/Message/Response.pm +++ b/lib/Mojo/Message/Response.pm @@ -152,9 +152,9 @@ Mojo::Message::Response - HTTP response # Parse my $res = Mojo::Message::Response->new; - $res->parse("HTTP/1.0 200 OK\x0a\x0d"); - $res->parse("Content-Length: 12\x0a\x0d\x0a\x0d"); - $res->parse("Content-Type: text/plain\x0a\x0d\x0a\x0d"); + $res->parse("HTTP/1.0 200 OK\x0d\x0a"); + $res->parse("Content-Length: 12\x0d\x0a"); + $res->parse("Content-Type: text/plain\x0d\x0a\x0d\x0a"); $res->parse('Hello World!'); say $res->code; say $res->headers->content_type;