mwrap (Perl version) user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* [PATCH] rproxy: do not depend on Plack::Middleware::Deflater
@ 2022-12-16  9:30 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2022-12-16  9:30 UTC (permalink / raw)
  To: mwrap-perl

There's no absolute need for this, but it's a nice-to-have if
available and running across multiple hosts.
---
 script/mwrap-rproxy | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/script/mwrap-rproxy b/script/mwrap-rproxy
index a5572c5..e8a02bc 100644
--- a/script/mwrap-rproxy
+++ b/script/mwrap-rproxy
@@ -28,8 +28,7 @@ Inherited socket (fd=3) is non-blocking, making it blocking.
 		$runner->set_options(listen_sock => $s);
 	}
 }
-if ($gz) {
-	require Plack::Middleware::Deflater;
+if ($gz && eval { require Plack::Middleware::Deflater } and !$@) {
 	$app = Plack::Middleware::Deflater->wrap($app);
 }
 $runner->run($app);

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-16  9:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-16  9:30 [PATCH] rproxy: do not depend on Plack::Middleware::Deflater Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mwrap-perl.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).