user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
* [PATCH 1/3] httpd: allow running if ReverseProxy is missing
@ 2016-02-28  5:42 Eric Wong
  2016-02-28  5:42 ` [PATCH 2/3] MANIFEST: update (generate via "git ls-files") Eric Wong
  2016-02-28  5:42 ` [PATCH 3/3] searchmsg: update + fix license header Eric Wong
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Wong @ 2016-02-28  5:42 UTC (permalink / raw)
  To: meta

Not everybody will be running this behind a ReverseProxy;
but it's probably the likely configuration.  Anyways,
warn about this and also about Deflater being missing.
---
 examples/public-inbox.psgi | 20 +++++++++++++-------
 script/public-inbox-httpd  | 24 +++++++++++++++---------
 2 files changed, 28 insertions(+), 16 deletions(-)

diff --git a/examples/public-inbox.psgi b/examples/public-inbox.psgi
index acceba3..0d11c19 100644
--- a/examples/public-inbox.psgi
+++ b/examples/public-inbox.psgi
@@ -9,21 +9,27 @@ use PublicInbox::WWW;
 PublicInbox::WWW->preload;
 use Plack::Request;
 use Plack::Builder;
-my $have_deflater = eval { require Plack::Middleware::Deflater; 1 };
 my $www = PublicInbox::WWW->new;
 builder {
 	enable 'Chunked';
-	if ($have_deflater) {
+	eval {
 		enable 'Deflater',
-			content_type => [ 'text/html', 'text/plain',
-					'application/atom+xml' ];
-	}
-
+			content_type => [ qw(
+				text/html
+				text/plain
+				application/atom+xml
+				)]
+	};
+	$@ and warn
+"Plack::Middleware::Deflater missing, bandwidth will be wasted\n";
 	# Enable to ensure redirects and Atom feed URLs are generated
 	# properly when running behind a reverse proxy server which
 	# sets X-Forwarded-For and X-Forwarded-Proto request headers.
 	# See Plack::Middleware::ReverseProxy documentation for details
-	enable 'ReverseProxy';
+	eval { enable 'ReverseProxy' };
+	$@ and warn
+"Plack::Middleware::ReverseProxy missing,\n",
+"URL generation for redirects may be wrong if behind a reverse proxy\n";
 
 	enable 'Head';
 	sub { $www->call(@_) };
diff --git a/script/public-inbox-httpd b/script/public-inbox-httpd
index 6109af0..19315bb 100755
--- a/script/public-inbox-httpd
+++ b/script/public-inbox-httpd
@@ -24,18 +24,24 @@ my $refresh = sub {
 		PublicInbox::WWW->preload;
 		my $www = PublicInbox::WWW->new;
 		$app = eval {
-			my $deflate_types = eval {
-				require Plack::Middleware::Deflater;
-				[ 'text/html', 'text/plain',
-					'application/atom+xml' ]
-			};
 			builder {
 				enable 'Chunked';
-				if ($deflate_types) {
+				eval {
 					enable 'Deflater',
-						content_type => $deflate_types
-				}
-				enable 'ReverseProxy';
+						content_type => [ qw(
+							text/html
+							text/plain
+							application/atom+xml
+							)]
+				};
+				$@ and warn
+"Plack::Middleware::Deflater missing, bandwidth will be wasted\n";
+
+				eval { enable 'ReverseProxy' };
+				$@ and warn
+"Plack::Middleware::ReverseProxy missing,\n",
+"URL generation for redirects may be wrong if behind a reverse proxy\n";
+
 				enable 'Head';
 				sub { $www->call(@_) };
 			};
-- 
EW


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/3] MANIFEST: update (generate via "git ls-files")
  2016-02-28  5:42 [PATCH 1/3] httpd: allow running if ReverseProxy is missing Eric Wong
@ 2016-02-28  5:42 ` Eric Wong
  2016-02-28  5:42 ` [PATCH 3/3] searchmsg: update + fix license header Eric Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2016-02-28  5:42 UTC (permalink / raw)
  To: meta

It's been a while...
---
 MANIFEST | 45 +++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 41 insertions(+), 4 deletions(-)

diff --git a/MANIFEST b/MANIFEST
index e11afc8..9718eed 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,5 +1,6 @@
 .gitignore
 COPYING
+Documentation/.gitignore
 Documentation/dc-dlvr-spam-flow.txt
 Documentation/design_notes.txt
 Documentation/design_www.txt
@@ -16,39 +17,75 @@ examples/README
 examples/apache2_cgi.conf
 examples/apache2_perl.conf
 examples/cgi-webrick.rb
+examples/cgit-commit-filter.lua
 examples/public-inbox-config
 examples/public-inbox.psgi
 lib/PublicInbox/Config.pm
+lib/PublicInbox/Daemon.pm
+lib/PublicInbox/ExtMsg.pm
 lib/PublicInbox/Feed.pm
 lib/PublicInbox/Filter.pm
 lib/PublicInbox/Git.pm
+lib/PublicInbox/GitHTTPBackend.pm
+lib/PublicInbox/HTTP.pm
 lib/PublicInbox/Hval.pm
+lib/PublicInbox/Listener.pm
 lib/PublicInbox/MDA.pm
-lib/PublicInbox/View.pm
+lib/PublicInbox/MID.pm
+lib/PublicInbox/Mbox.pm
+lib/PublicInbox/Msgmap.pm
+lib/PublicInbox/NNTP.pm
+lib/PublicInbox/NewsGroup.pm
+lib/PublicInbox/NewsWWW.pm
+lib/PublicInbox/ProcessPipe.pm
+lib/PublicInbox/Search.pm
+lib/PublicInbox/SearchIdx.pm
+lib/PublicInbox/SearchMsg.pm
+lib/PublicInbox/SearchView.pm
+lib/PublicInbox/Spawn.pm
+lib/PublicInbox/SpawnPP.pm
 lib/PublicInbox/Thread.pm
+lib/PublicInbox/View.pm
 lib/PublicInbox/WWW.pm
-public-inbox-learn
-public-inbox-mda
-public-inbox.cgi
 sa_config/Makefile
 sa_config/README
 sa_config/root/etc/spamassassin/public-inbox.pre
 sa_config/user/.spamassassin/user_prefs
+script/public-inbox-httpd
+script/public-inbox-index
+script/public-inbox-init
+script/public-inbox-learn
+script/public-inbox-mda
+script/public-inbox-nntpd
+script/public-inbox.cgi
 scripts/dc-dlvr
 scripts/dc-dlvr.pre
 scripts/edit-sa-prefs
 scripts/import_maildir
+scripts/import_slrnspool
 scripts/report-spam
 scripts/slrnspool2maildir
 t/cgi.t
+t/common.perl
 t/config.t
 t/fail-bin/spamc
 t/feed.t
 t/filter.t
+t/git.fast-import-data
+t/git.t
 t/html_index.t
+t/httpd-corner.psgi
+t/httpd-corner.t
+t/httpd.t
+t/init.t
 t/main-bin/spamc
 t/mda.t
+t/msgmap.t
+t/nntp.t
+t/nntpd.t
 t/plack.t
 t/precheck.t
+t/search.t
+t/spawn.t
 t/utf8.mbox
 t/view.t
-- 
EW


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 3/3] searchmsg: update + fix license header
  2016-02-28  5:42 [PATCH 1/3] httpd: allow running if ReverseProxy is missing Eric Wong
  2016-02-28  5:42 ` [PATCH 2/3] MANIFEST: update (generate via "git ls-files") Eric Wong
@ 2016-02-28  5:42 ` Eric Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2016-02-28  5:42 UTC (permalink / raw)
  To: meta

Not sure how, but this should've always been AGPL-3.0+ like
the rest of the code, not GPL-3.0+
---
 lib/PublicInbox/SearchMsg.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/PublicInbox/SearchMsg.pm b/lib/PublicInbox/SearchMsg.pm
index 93be747..1b33d09 100644
--- a/lib/PublicInbox/SearchMsg.pm
+++ b/lib/PublicInbox/SearchMsg.pm
@@ -1,5 +1,5 @@
-# Copyright (C) 2015 all contributors <meta@public-inbox.org>
-# License: GPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+# Copyright (C) 2015-2016 all contributors <meta@public-inbox.org>
+# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 # based on notmuch, but with no concept of folders, files or flags
 #
 # Wraps a document inside our Xapian search index.
-- 
EW


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-28  5:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-28  5:42 [PATCH 1/3] httpd: allow running if ReverseProxy is missing Eric Wong
2016-02-28  5:42 ` [PATCH 2/3] MANIFEST: update (generate via "git ls-files") Eric Wong
2016-02-28  5:42 ` [PATCH 3/3] searchmsg: update + fix license header Eric Wong

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).