From 4af278501461f91844da1e2ffb82cf8571238d02 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 19 Feb 2017 19:01:39 +0000 Subject: repobrowse: unconditionally remove trailing slash handling We do not need specialized trailing slashes if we break URL compatibility from cgit, here. Removing trailing (and redundant) slashes improves our hit rates with across both server-side (varnish, squid) and client-side (browser) layers. --- t/repobrowse_git_raw.t | 6 ------ 1 file changed, 6 deletions(-) (limited to 't') diff --git a/t/repobrowse_git_raw.t b/t/repobrowse_git_raw.t index 2048d82a..aefe88c7 100644 --- a/t/repobrowse_git_raw.t +++ b/t/repobrowse_git_raw.t @@ -14,12 +14,6 @@ test_psgi($test->{app}, sub { like($noslash_body, qr{href="dir/dur">dur}, 'path ok w/o slash'); - my $slash = $req . '/'; - my $r2 = $cb->(GET($slash)); - is(200, $r2->code, 'got 200 response from dir'); - my $slash_body = dechunk($r2); - like($slash_body, qr{href="\./dur\">dur}, 'path ok w/ slash'); - $req = 'http://example.com/test.git/raw/master/foo.txt'; my $blob = $cb->(GET($req)); like($blob->header('Content-Type'), qr!\Atext/plain\b!, -- cgit v1.2.3-24-ge0c7