Thank you all.
I not preteding to change behavior due to one buggy server.
But i still searching the way for workaround.
Looks like relaxed is the way. Sorry Tekky, I didn't undersant it well.
This works ok:
my $res = Mojo::Message::Response->new;
$res->content->relaxed(1);
$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;
But I have still problem with UA. Probably my relaxed setting rewrited
somewhere. Thats still not work:
my $tx=
$ua->get($uri);
$tx->res->content->relaxed(1);
my $res=$tx->res;
2014-06-03 18:57 GMT+06:00 sri <[email protected]>:
> Otherwise you verify the spec and if you find the Mojo::UA behaviour not
>> according to the spec, provide a spec test.
>>
>
> This is actually a really complicated case, and the current
> Mojo::UserAgent behavior is intentional. Over the years we've encountered
> quite a few proxy servers that respond to CONNECT requests with responses
> like "HTTP/1.0 200 OK\x0d\x0a\x0d\x0a" to indicate that the connection has
> been established. I'm of course open to changing the behavior, but i want a
> very good explanation for why we should do it (backed up by some serious
> research).
>
> https://github.com/kraih/mojo/blob/master/lib/Mojo/Content.pm#L115
>
> Here's the block of code responsible for handling the special case.
>
> --
> sebastian
>
> --
> 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.