From 2722ba03b74a782c0f64c7a6b1d09b7b82ff5478 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 7 Mar 2016 08:10:55 +0000 Subject: repobrowse: git fallback allows smart cloning We can reuse the existing code for cloning ssoma repositories to serve normal git repos for repobrowse. Also, this finally adds a test to fallback to dumb cloning when http.uploadPack is disabled for the git repository to save CPU/memory on the host machine. --- lib/PublicInbox/Repobrowse.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/Repobrowse.pm') diff --git a/lib/PublicInbox/Repobrowse.pm b/lib/PublicInbox/Repobrowse.pm index 82d38f90..51ec14c8 100644 --- a/lib/PublicInbox/Repobrowse.pm +++ b/lib/PublicInbox/Repobrowse.pm @@ -68,7 +68,7 @@ sub root_index { sub run { my ($self, $cgi, $method) = @_; - return r(405, 'Method Not Allowed') if ($method !~ /\AGET|HEAD\z/); + return r(405, 'Method Not Allowed') if ($method !~ /\AGET|HEAD|POST\z/); # URL syntax: / repo [ / cmd [ / path ] ] # cmd: log | commit | diff | tree | view | blob | snapshot -- cgit v1.2.3-24-ge0c7