diff options
author | Robert Speicher <robert@gitlab.com> | 2016-10-11 14:04:31 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-10-11 14:04:31 +0000 |
commit | 5c6cbfa6cbc6cb82ba20e615c27f98649265b4ce (patch) | |
tree | e8e91e7201426324eb0e0e55dbee5099ca59e801 /spec/routing | |
parent | e28623cc6e54fdcce8b4b8432c767c085a2b7bc0 (diff) | |
parent | 1022456bb15d18b05c14fe344950fb75c7c69f48 (diff) | |
download | gitlab-ce-5c6cbfa6cbc6cb82ba20e615c27f98649265b4ce.tar.gz |
Merge branch 'atom-routes' into 'master'
Allow browsing branches that end with '.atom'
## What does this MR do?
1. Simplify the regex capture in the routing for the CommitsController
to not exclude the '.atom' suffix. That's a perfectly valid git
branch name, so we shouldn't blow up if we get it.
2. Because Rails now can't automatically detect the request format, add
some code to do so in `ExtractPath` when there is no path. This means
that, given branches 'foo' and 'foo.atom', the Atom feed for the
former is unroutable. To fix this: don't do that! Give the branches
different names!
## Why was this MR needed?
Creating a branch or tag name ending in '.atom' would cause some 500s on that repo.
## What are the relevant issue numbers?
Closes #21955. Related to !5994.
See merge request !6750
Diffstat (limited to 'spec/routing')
-rw-r--r-- | spec/routing/project_routing_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/routing/project_routing_spec.rb b/spec/routing/project_routing_spec.rb index 77842057a10..2322430d212 100644 --- a/spec/routing/project_routing_spec.rb +++ b/spec/routing/project_routing_spec.rb @@ -337,7 +337,7 @@ describe Projects::CommitsController, 'routing' do end it 'to #show' do - expect(get('/gitlab/gitlabhq/commits/master.atom')).to route_to('projects/commits#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master', format: 'atom') + expect(get('/gitlab/gitlabhq/commits/master.atom')).to route_to('projects/commits#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master.atom') end end |