You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In accordance with the documentation, I believe that callback should be called always. But when you set the content_length header, then the last callback is not invoked. Below is the test that shows this behavior.
#!/usr/bin/perluse Mojolicious::Lite;
use Test::Mojo;
use Test::More;
get '/'=>sub {
my$c = shift->render_later;
$c->res->headers->content_length(2);
$c->write('11', sub { app->defaults(qwe=> 1234); $c->finish });
};
app->start;
my$t = Test::Mojo->new;
$t->get_ok('/')->status_is(200);
is app->defaults('qwe'), 1234;
done_testing;
I believe that this is a bug, since it's not documented.
The text was updated successfully, but these errors were encountered:
Here, when all needed data has been send, transaction is marked as completed. And get_body_chunk will never be called again. That's only place, where drain event for Mojo::Content emitted.
In accordance with the documentation, I believe that callback should be called always. But when you set the content_length header, then the last callback is not invoked. Below is the test that shows this behavior.
I believe that this is a bug, since it's not documented.
The text was updated successfully, but these errors were encountered: