Project

General

Profile

Bug #6780

Updated by Brett Smith over 8 years ago

Currently, as verified by tests, arvados-git-httpd returns 500 when the servers are all working perfectly but the client used an invalid token. 

 Existing test case: 

 <pre> 
 func (s *IntegrationSuite) TestInvalidToken(c *check.C) { 
	 for _, repo := range []string{"active/foo.git", "active/foo/.git"} { 
		 err := s.runGit(c, "no-such-token-in-the-system", "fetch", repo) 
		 c.Assert(err, check.ErrorMatches, `.* 500 while accessing.*`) 
	 } 
 } 
 </pre> 

 Observed behavior in production (arvados-git-httpd 0.1.20150714174007.f78434f): 

 <pre> 
 $ git clone http://localhost:9001/foo.git 
 Cloning into 'foo'... 
 Username for 'http://localhost:9001': asdf 
 Password for 'http://asdf@localhost:9001': asdf 
 fatal: unable to access 'http://localhost:9001/foo.git/': The requested URL returned error: 500 
 </pre> 

 Logged: 

 <pre> 
 2015-07-28_16:05:39.51912 2015/07/28 16:05:39 "[::1]:52434" "asdf" "asdf" 500 "arvados API server error: Not logged in (401: 401 Unauthorized) returned by bogus.arvadosapi.com" "foo" "GET" "/foo.git/info/refs" 
 </pre> 

 Expected / desired: 
 * arv-git-httpd should not return 5xx: this is arv-git-httpd's client's problem to fix, not arv-git-httpd's. 
 * Presumably it should pass the 401 status back to the client. 
 * The test should be updated to check for a 401 status.

Back