Two more problems with Mojolicious

Александр Поволоцкий tarkhil at over.ru
Mon Mar 4 16:06:16 UTC 2019


My program outputs JSON. decode_json works fine with HTTP, to_json is 
required for PSGI.

On 04.03.2019 19:03, Alexander Borisov wrote:
> Hello Alexander,
>
>> 4 марта 2019 г., в 14:25, Александр Поволоцкий <tarkhil at over.ru 
>> <mailto:tarkhil at over.ru>> написал(а):
>>
>> Hello
>>
>> 1. When I'm sending chunked content (I'm using some fairly long 
>> database requests, and cursor sending lines one by one is much better 
>> in term of both memory usage and response speed) is shown on client 
>> side with chunks' lenghts.
>>
>> 2. UTF-8 data gets double encoded.
>
> I tried this example:
> use Mojolicious::Lite;
> use Devel::StackTrace;
> get '/' => sub {
> my $c = shift;
> $c->render(text => 'Привет');
> };
> app->start;
>
> Works fine for me.
>
> > GET / HTTP/1.1
> > Host: localhost:8500
> > User-Agent: curl/7.54.0
> > Accept: */*
> > 
> < HTTP/1.1 200 OK
> < Date: Mon, 04 Mar 2019 15:51:50 GMT
> < Content-Type: text/html;charset=UTF-8
> < Content-Length: 12
> < Server: Unit/1.8.0
> <
> * Connection #0 to host localhost left intact
> Привет
>
>>
>> If you need, I'll make a short example.
>>
>> --
>>
>> Alex
>>
>> _______________________________________________
>> unit mailing list
>> unit at nginx.org <mailto:unit at nginx.org>
>> https://mailman.nginx.org/mailman/listinfo/unit
>
>
> _______________________________________________
> unit mailing list
> unit at nginx.org
> https://mailman.nginx.org/mailman/listinfo/unit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/unit/attachments/20190304/22b30f2a/attachment.html>


More information about the unit mailing list