File tree Expand file tree Collapse file tree 2 files changed +10
-14
lines changed Expand file tree Collapse file tree 2 files changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -1259,19 +1259,17 @@ async fn call_service(
12591259 }
12601260 pu
12611261 } else {
1262- let redirect_path = if path == "/" {
1263- "/~/ui/" . to_string ( )
1262+ if path == "/" {
1263+ let redirect_path = "/~/ui/" . to_string ( ) ;
1264+ return Ok ( Response :: builder ( )
1265+ . status ( hyper:: StatusCode :: FOUND )
1266+ . header ( "Location" , redirect_path)
1267+ . body ( Full :: new ( Bytes :: new ( ) ) ) ?) ;
12641268 } else {
1265- format ! (
1266- "/~/ui/browse?repo={}.git&path=&filter=%3A%2F&rev=HEAD" ,
1267- path
1268- )
1269+ return Ok ( Response :: builder ( )
1270+ . status ( hyper:: StatusCode :: NOT_FOUND )
1271+ . body ( Full :: new ( Bytes :: new ( ) ) ) ?) ;
12691272 } ;
1270-
1271- return Ok ( Response :: builder ( )
1272- . status ( hyper:: StatusCode :: FOUND )
1273- . header ( "Location" , redirect_path)
1274- . body ( Full :: new ( Bytes :: new ( ) ) ) ?) ;
12751273 }
12761274 } ;
12771275
Original file line number Diff line number Diff line change 2424 $ cd $ {TESTTMP}
2525
2626 $ git clone -q http: // localhost: 8002 / xxx full_repo
27- fatal : unable to update url base from redirection:
28- asked for : http: // localhost: 8002 / xxx/ info/ refs? service= git-upload-pack
29- redirect: http: // localhost: 8002 /~/ ui/ browse? repo= /xxx /info/ refs. git& path = & filter = % 3A% 2F& rev = HEAD
27+ fatal : repository ' http://localhost:8002/xxx/' not found
3028 [128 ]
3129
3230 $ bash $ {TESTDIR}/ destroy_test_env. sh
You can’t perform that action at this time.
0 commit comments