Actions
Bug #6780
open[git] "git clone https://..." with a bogus token should respond 4xx, not 5xx
Story points:
0.5
Release:
Release relationship:
Auto
Description
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:
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.*`) } }
Observed behavior in production (arvados-git-httpd 0.1.20150714174007.f78434f):
$ 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
Logged:
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"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.
Updated by Tom Clegg over 9 years ago
- Category set to API
- Target version set to Arvados Future Sprints
- Story points set to 0.5
Updated by Brett Smith over 9 years ago
- Description updated (diff)
- Category changed from API to Git hosting
Updated by Ward Vandewege over 3 years ago
- Target version deleted (
Arvados Future Sprints)
Actions