From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 2/4] www: gzip_filter: update a few comments
Date: Wed, 3 Aug 2022 07:59:10 +0000 [thread overview]
Message-ID: <20220803075912.10219-3-e@80x24.org> (raw)
In-Reply-To: <20220803075912.10219-1-e@80x24.org>
A few things I noticed while reviewing and evaluating
the PSGI code for JMAP support.
---
lib/PublicInbox/GzipFilter.pm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/PublicInbox/GzipFilter.pm b/lib/PublicInbox/GzipFilter.pm
index c586d2f8..d41748c4 100644
--- a/lib/PublicInbox/GzipFilter.pm
+++ b/lib/PublicInbox/GzipFilter.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2020-2021 all contributors <meta@public-inbox.org>
+# Copyright (C) all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
#
# In public-inbox <=1.5.0, public-inbox-httpd favored "getline"
@@ -116,6 +116,7 @@ sub translate ($$) {
}
}
+# returns PublicInbox::HTTP::{Chunked,Identity}
sub http_out ($) {
my ($self) = @_;
$self->{http_out} // do {
@@ -183,7 +184,7 @@ sub bail {
# this is public-inbox-httpd-specific
sub async_blob_cb { # git->cat_async callback
my ($bref, $oid, $type, $size, $self) = @_;
- my $http = $self->{env}->{'psgix.io'};
+ my $http = $self->{env}->{'psgix.io'}; # PublicInbox::HTTP
$http->{forward} or return; # client aborted
my $smsg = $self->{smsg} or bail($self, 'BUG: no smsg');
if (!defined($oid)) {
@@ -195,7 +196,7 @@ sub async_blob_cb { # git->cat_async callback
$smsg->{blob} eq $oid or bail($self, "BUG: $smsg->{blob} != $oid");
eval { $self->async_eml(PublicInbox::Eml->new($bref)) };
bail($self, "E: async_eml: $@") if $@;
- if ($self->{-low_prio}) {
+ if ($self->{-low_prio}) { # run via PublicInbox::WWW::event_step
push(@{$self->{www}->{-low_prio_q}}, $self) == 1 and
PublicInbox::DS::requeue($self->{www});
} else {
next prev parent reply other threads:[~2022-08-03 7:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-03 7:59 [PATCH 0/4] compression-related stuff Eric Wong
2022-08-03 7:59 ` [PATCH 1/4] www: gzip_filter: gracefully handle socket ->write failures Eric Wong
2022-08-03 7:59 ` Eric Wong [this message]
2022-08-03 7:59 ` [PATCH 3/4] ds: use ->dflush to distinguish from ->zflush Eric Wong
2022-08-03 7:59 ` [PATCH 4/4] www: simplify GzipFilter->zflush callers Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220803075912.10219-3-e@80x24.org \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).