Skip to content
Snippets Groups Projects
Commit 17e3b249 authored by Christophe Monniez's avatar Christophe Monniez
Browse files

[FIX] website: allow status 308 in redirect double slash

When redirecting when a double slash appears in url, werkzeug >= 2.2.0
redirects with a status 308 instead of a 301.

Part-of: odoo/odoo#112197
parent e3f3e025
No related branches found
No related tags found
No related merge requests found
......@@ -35,5 +35,5 @@ class TestHttpEndPoint(HttpCase):
def test_redirect_double_slash(self):
res = self.url_open('/test_http//greeting', allow_redirects=False)
self.assertEqual(res.status_code, 301)
self.assertIn(res.status_code, (301, 308))
self.assertEqual(werkzeug.urls.url_parse(res.headers.get('Location', '')).path, '/test_http/greeting')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment