File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
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
You can’t perform that action at this time.
0 commit comments