[PATCH 4/7] examples: config no longer supports atomUrl

2016-05-27 Thread Eric Wong
We build the atomUrl from url, which can change dynamically depending on what PSGI environment it is called under. --- examples/public-inbox-config | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/public-inbox-config b/examples/public-inbox-config index 0c1db11..7fcbe0b 100644 ---

[PATCH 0/7] miscellaneous cleanups

2016-05-27 Thread Eric Wong
Only the last one (NewsGroup class removal for ::Inbox) is likely to cause problems but I'll be checking logs for errors. Eric Wong (7): t/plack: ensure we can cascade on common endpoints http: clarify comments about layering violation Makefile.PL: allow N to be overridden

[PATCH 1/7] t/plack: ensure we can cascade on common endpoints

2016-05-27 Thread Eric Wong
We don't serve things like robots.txt, favicon.ico, or .well-known/ endpoints ourselves, but ensure we can be used with Plack::App::Cascade for others. --- t/plack.t | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/t/plack.t b/t/plack.t index 04680b2..a4f3245

[PATCH] config: fix NewsWWW fallback for newsgroups in HTTP URLs

2016-05-27 Thread Eric Wong
Oops, added a test to prevent regressions while we're at it. --- lib/PublicInbox/Config.pm | 4 +++- lib/PublicInbox/NewsWWW.pm | 3 ++- t/plack.t | 15 +++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/Config.pm

[PATCH 1/2] git-http-backend: move real close to GetlineBody

2016-05-27 Thread Eric Wong
This makes more sense as it keeps management of rpipe nice and neat. --- lib/PublicInbox/GetlineBody.pm| 12 lib/PublicInbox/GitHTTPBackend.pm | 1 - 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/PublicInbox/GetlineBody.pm b/lib/PublicInbox/GetlineBody.pm

[PATCH 2/2] git-http-backend: close pipe for generic PSGI on errors

2016-05-27 Thread Eric Wong
The generic PSGI code needs to avoid resource leaks if smart cloning is disabled (due to resource contraints). --- lib/PublicInbox/GitHTTPBackend.pm | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/GitHTTPBackend.pm b/lib/PublicInbox/GitHTTPBackend.pm

[PATCH 4/3] httpd/async: do not needlessly weaken

2016-05-27 Thread Eric Wong
The restart_read callback has no chance of circular reference, and weakening $self before we create it can cause $self to be undefined inside the callback (seen during stress testing). Fixes: 395406118cb2 ("httpd/async: prevent circular reference") --- lib/PublicInbox/HTTPD/Async.pm | 7 ++-

[PATCH 1/3] httpd/async: prevent circular reference

2016-05-27 Thread Eric Wong
We must avoid circular references which can cause leaks in long-running processes. This callback is dangerous since it may never be called to properly terminate everything. --- lib/PublicInbox/HTTPD/Async.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH 2/3] http: avoid circular reference for getline responses

2016-05-27 Thread Eric Wong
Lightly tested, this seems to work when mass-aborting responses. Will still need to automate the testing... --- lib/PublicInbox/HTTP.pm | 45 - 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/lib/PublicInbox/HTTP.pm

[PATCH 3/3] git-http-backend: fix aborts for generic PSGI clone

2016-05-27 Thread Eric Wong
We need to avoid circular references in the generic PSGI layer, do it by abusing DESTROY. --- lib/PublicInbox/GetlineBody.pm| 31 +++ lib/PublicInbox/GitHTTPBackend.pm | 13 - 2 files changed, 35 insertions(+), 9 deletions(-) create mode 100644

[PATCH 0/3] http: another round EPIPE fixes

2016-05-27 Thread Eric Wong
Hopefully this is end of resource leaks on prematurely aborted client connections. Eric Wong (3): httpd/async: prevent circular reference http: avoid circular reference for getline responses git-http-backend: fix aborts for generic PSGI clone lib/PublicInbox/GetlineBody.pm