File tree Expand file tree Collapse file tree 4 files changed +67
-2
lines changed
tests/docs-redirects/specs Expand file tree Collapse file tree 4 files changed +67
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ location = / {
88}
99
1010# Python 3 docs are the default at the root of each translation.
11- location ~ ^/(bn-in|el|es|fr|id|it|ja|ko|pl|pt-br|ro|tr|uk|zh-cn|zh-tw)/$ {
11+ location ~ ^/(bn-in|el|es|fr|id|it|ja|ko|pl|pt-br|ro|sv| tr|uk|zh-cn|zh-tw)/$ {
1212 return 302 $scheme://$host/$1/3/;
1313}
1414
@@ -190,7 +190,7 @@ location ~ ^/((2|3)(\.[0-9]+)?|dev)/\w+/[\d\w\.]+(?!\.html)$ {
190190location ~ ^/((2|3)(\.[0-9]+)?|dev)/ {
191191 add_header Surrogate-Key en/$1 always;
192192}
193- location ~ ^/(bn-in|el|es|fr|id|it|ja|ko|pl|pt-br|ro|tr|uk|zh-cn|zh-tw)/((2|3)(\.[0-9]+)?|dev)/ {
193+ location ~ ^/(bn-in|el|es|fr|id|it|ja|ko|pl|pt-br|ro|tr|sv| uk|zh-cn|zh-tw)/((2|3)(\.[0-9]+)?|dev)/ {
194194 add_header Surrogate-Key $1/$2 always;
195195}
196196
Original file line number Diff line number Diff line change @@ -183,6 +183,21 @@ HTTP 301
183183[Asserts]
184184header "Location" == "https://localhost/ro/3.14/"
185185
186+ GET {{host}}/sv/3/library/2to3.html
187+ HTTP 301
188+ [Asserts]
189+ header "Location" == "https://localhost/sv/3/"
190+
191+ GET {{host}}/sv/3.13/library/2to3.html
192+ HTTP 301
193+ [Asserts]
194+ header "Location" == "https://localhost/sv/3.13/"
195+
196+ GET {{host}}/sv/3.14/library/2to3.html
197+ HTTP 301
198+ [Asserts]
199+ header "Location" == "https://localhost/sv/3.14/"
200+
186201GET {{host}}/tr/3/library/2to3.html
187202HTTP 301
188203[Asserts]
@@ -425,6 +440,21 @@ HTTP 301
425440[Asserts]
426441header "Location" == "https://localhost/ro/3.14/"
427442
443+ GET {{host}}/sv/3/library/tkinter.tix.html
444+ HTTP 301
445+ [Asserts]
446+ header "Location" == "https://localhost/sv/3/"
447+
448+ GET {{host}}/sv/3.13/library/tkinter.tix.html
449+ HTTP 301
450+ [Asserts]
451+ header "Location" == "https://localhost/sv/3.13/"
452+
453+ GET {{host}}/sv/3.14/library/tkinter.tix.html
454+ HTTP 301
455+ [Asserts]
456+ header "Location" == "https://localhost/sv/3.14/"
457+
428458GET {{host}}/tr/3/library/tkinter.tix.html
429459HTTP 301
430460[Asserts]
Original file line number Diff line number Diff line change @@ -63,6 +63,11 @@ HTTP 302
6363[Asserts]
6464header "Location" == "http://localhost/ro/3/"
6565
66+ GET {{host}}/sv/
67+ HTTP 302
68+ [Asserts]
69+ header "Location" == "http://localhost/sv/3/"
70+
6671GET {{host}}/tr/
6772HTTP 302
6873[Asserts]
Original file line number Diff line number Diff line change @@ -625,6 +625,36 @@ HTTP 404
625625[Asserts]
626626header "Surrogate-Key" == "ro/dev"
627627
628+ GET {{host}}/sv/3/
629+ HTTP 404
630+ [Asserts]
631+ header "Surrogate-Key" == "sv/3"
632+
633+ GET {{host}}/sv/3/about.html
634+ HTTP 404
635+ [Asserts]
636+ header "Surrogate-Key" == "sv/3"
637+
638+ GET {{host}}/sv/3.14/
639+ HTTP 404
640+ [Asserts]
641+ header "Surrogate-Key" == "sv/3.14"
642+
643+ GET {{host}}/sv/3.14/about.html
644+ HTTP 404
645+ [Asserts]
646+ header "Surrogate-Key" == "sv/3.14"
647+
648+ GET {{host}}/sv/dev/
649+ HTTP 404
650+ [Asserts]
651+ header "Surrogate-Key" == "sv/dev"
652+
653+ GET {{host}}/sv/dev/about.html
654+ HTTP 404
655+ [Asserts]
656+ header "Surrogate-Key" == "sv/dev"
657+
628658GET {{host}}/tr/3/
629659HTTP 404
630660[Asserts]
You can’t perform that action at this time.
0 commit comments