diff options
author | Eric Wong <e@yhbt.net> | 2020-07-30 23:43:50 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-08-01 00:38:13 +0000 |
commit | 0821af5f21fdb083020ae2e3e79e4227ef59cd4f (patch) | |
tree | 8ecc87f31893549031b94331e9ed02a80ac5bed0 /lib/PublicInbox/WwwStream.pm | |
parent | f60f934cfe1e7a06c853741fbabbbbe3a9a747a4 (diff) | |
download | public-inbox-0821af5f21fdb083020ae2e3e79e4227ef59cd4f.tar.gz |
Although the ->async_next method does not take $self as a receiver, but rather a PublicInbox::HTTP object, we may still retrieve it to be called with the HTTP object via UNIVERSAL->can.
Diffstat (limited to 'lib/PublicInbox/WwwStream.pm')
-rw-r--r-- | lib/PublicInbox/WwwStream.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm index 23b03f0e..d79770ed 100644 --- a/lib/PublicInbox/WwwStream.pm +++ b/lib/PublicInbox/WwwStream.pm @@ -28,7 +28,7 @@ sub init { bless $ctx, __PACKAGE__; } -sub async_eml { # ->{async_eml} for async_blob_cb +sub async_eml { # for async_blob_cb my ($ctx, $eml) = @_; $ctx->{http_out}->write($ctx->translate($ctx->{cb}->($ctx, $eml))); } @@ -198,7 +198,7 @@ sub aresponse { my ($ctx, $code, $cb) = @_; my $res_hdr = [ 'Content-Type' => 'text/html; charset=UTF-8' ]; init($ctx, $cb); - $ctx->psgi_response($code, $res_hdr, \&async_next, \&async_eml); + $ctx->psgi_response($code, $res_hdr); } 1; |