Thank you Tekki, but I didn't understand where is Content here.

Please look at this script:

use Mojo::Message::Response;

# Parse bad Content-Length
my $res = Mojo::Message::Response->new;
$res->parse("HTTP/1.0 200 OK\x0d\x0a");
$res->parse("Content-Length: 0\x0d\x0a");
$res->parse("Content-Type: text/plain\x0d\x0a\x0d\x0a");
$res->parse('Hello World!');
print $res->to_string;


It return:

HTTP/1.0 200 OK
Date: Tue, 03 Jun 2014 12:53:19 GMT
Content-Length: 0
Content-Type: text/plain

Body is lost due to Content-length.

I searching the way for ignore that header.


2014-06-03 18:35 GMT+06:00 Tekki <[email protected]>:

> Have you tried this? http://mojolicio.us/perldoc/Mojo/Content#relaxed
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Mojolicious" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/mojolicious/-Ro0_w4cblg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/mojolicious.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to