From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id B1B161F463; Fri, 27 Dec 2019 10:36:58 +0000 (UTC) Date: Fri, 27 Dec 2019 10:36:58 +0000 From: Eric Wong To: meta@public-inbox.org Subject: Re: [PATCH 14/30] githttpbackend: split out wwwstatic Message-ID: <20191227103658.GA24275@dcvr> References: <20191225075104.22184-1-e@80x24.org> <20191225075104.22184-15-e@80x24.org> <20191226125042.GA8713@dcvr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191226125042.GA8713@dcvr> List-Id: Eric Wong wrote: > Eric Wong wrote: > > Make it easier to share code between our GitHTTPBackend and Cgit > > packages, for now, and possibly other packages in the future. > > Well, I need to actually use the new package :x Actually, not really, but... > More stuff which needs test coverage :x Naming things is hard (or namespacing is overrated :P) diff --git a/lib/PublicInbox/Cgit.pm b/lib/PublicInbox/Cgit.pm index d7e996b2..ab4065bd 100644 --- a/lib/PublicInbox/Cgit.pm +++ b/lib/PublicInbox/Cgit.pm @@ -115,7 +115,7 @@ sub call { } elsif ($path_info =~ m!$self->{static}! && defined($cgit_data = $self->{cgit_data})) { my $f = $1; - return PublicInbox::WwwStatic::result($env, [], $cgit_data.$f, + return PublicInbox::WwwStatic::response($env, [], $cgit_data.$f, Plack::MIME->mime_type($f)); }