Skip to content

Commit 245dbe0

Browse files
Fix test
1 parent dacf804 commit 245dbe0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/middlewares/rack/redirect.rb

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def call env
1212

1313
# special case: non-ASCII paths
1414
redirects = {
15+
'/sitemap.xml' => '/sitemap.xml.gz',
1516
'/search?utf8=✓&' => '/search',
1617
'/tce/%uFEFF' => '/tce'
1718
}

spec/requests/clean_paths_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
expect(response.header['Location']).to eq('/about/faq?test=true')
1616
end
1717

18-
it 'does not strip .xml extension from sitemap.xml' do
19-
get 'http://example.com/sitemap.xml'
18+
it 'does not strip .xml extension from sitemap.xml.gz' do
19+
get 'http://example.com/sitemap.xml.gz'
2020

2121
expect(response).to have_http_status(:ok)
2222
expect(response.header['Location']).to be_nil

0 commit comments

Comments
 (0)