Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2016-10-07 18:49:48 +0300
committerSean McGivern <sean@gitlab.com>2016-10-11 15:31:12 +0300
commit1022456bb15d18b05c14fe344950fb75c7c69f48 (patch)
treeaace3fadc569905719232d73811739961450c22e /config
parent8581df3bfb9e847d07a585a22cfa21658ae40ea2 (diff)
Allow browsing branches that end with '.atom'
We need to do two things to support this: 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!
Diffstat (limited to 'config')
-rw-r--r--config/routes/project.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/config/routes/project.rb b/config/routes/project.rb
index e8807ef06a7..4c1da5c4df5 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -159,7 +159,7 @@ resources :namespaces, path: '/', constraints: { id: /[a-zA-Z.0-9_\-]+/ }, only:
get(
'/commits/*id',
to: 'commits#show',
- constraints: { id: /(?:[^.]|\.(?!atom$))+/, format: /atom/ },
+ constraints: { id: /.+/, format: false },
as: :commits
)
end