File tree Expand file tree Collapse file tree
tests/docs-redirects/specs Expand file tree Collapse file tree 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|de|el|es|fr|id|it|ja|ko|pl|pt-br|ro|ru|sv|tr|uk|zh-cn|zh-tw)/$ {
11+ location ~ ^/(bn-in|de|el|es|fa| fr|id|it|ja|ko|pl|pt-br|ro|ru|sv|tr|uk|zh-cn|zh-tw)/$ {
1212 return 302 $scheme://$host/$1/3/;
1313}
1414
@@ -195,7 +195,7 @@ location ~ ^/((2|3)(\.[0-9]+)?|dev)/ {
195195 error_page 404 /$1/404.html;
196196 add_header Surrogate-Key en/$1 always;
197197}
198- location ~ ^/(bn-in|de|el|es|fr|id|it|ja|ko|pl|pt-br|ro|ru|tr|sv|uk|zh-cn|zh-tw)/((2|3)(\.[0-9]+)?|dev)/ {
198+ location ~ ^/(bn-in|de|el|es|fa| fr|id|it|ja|ko|pl|pt-br|ro|ru|tr|sv|uk|zh-cn|zh-tw)/((2|3)(\.[0-9]+)?|dev)/ {
199199 error_page 404 /$1/$2/404.html;
200200 add_header Surrogate-Key $1/$2 always;
201201}
Original file line number Diff line number Diff line change @@ -63,6 +63,21 @@ HTTP 301
6363[Asserts]
6464header "Location" == "https://localhost/es/3.14/"
6565
66+ GET {{host}}/fa/3/library/2to3.html
67+ HTTP 301
68+ [Asserts]
69+ header "Location" == "https://localhost/fa/3/"
70+
71+ GET {{host}}/fa/3.13/library/2to3.html
72+ HTTP 301
73+ [Asserts]
74+ header "Location" == "https://localhost/fa/3.13/"
75+
76+ GET {{host}}/fa/3.14/library/2to3.html
77+ HTTP 301
78+ [Asserts]
79+ header "Location" == "https://localhost/fa/3.14/"
80+
6681GET {{host}}/fr/3/library/2to3.html
6782HTTP 301
6883[Asserts]
@@ -335,6 +350,21 @@ HTTP 301
335350[Asserts]
336351header "Location" == "https://localhost/es/3.14/"
337352
353+ GET {{host}}/fa/3/library/tkinter.tix.html
354+ HTTP 301
355+ [Asserts]
356+ header "Location" == "https://localhost/fa/3/"
357+
358+ GET {{host}}/fa/3.13/library/tkinter.tix.html
359+ HTTP 301
360+ [Asserts]
361+ header "Location" == "https://localhost/fa/3.13/"
362+
363+ GET {{host}}/fa/3.14/library/tkinter.tix.html
364+ HTTP 301
365+ [Asserts]
366+ header "Location" == "https://localhost/fa/3.14/"
367+
338368GET {{host}}/fr/3/library/tkinter.tix.html
339369HTTP 301
340370[Asserts]
Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ HTTP 302
2323[Asserts]
2424header "Location" == "http://localhost/es/3/"
2525
26+ GET {{host}}/fa/
27+ HTTP 302
28+ [Asserts]
29+ header "Location" == "http://localhost/fa/3/"
30+
2631GET {{host}}/fr/
2732HTTP 302
2833[Asserts]
Original file line number Diff line number Diff line change @@ -385,6 +385,36 @@ HTTP 404
385385[Asserts]
386386header "Surrogate-Key" == "es/dev"
387387
388+ GET {{host}}/fa/3/
389+ HTTP 404
390+ [Asserts]
391+ header "Surrogate-Key" == "fa/3"
392+
393+ GET {{host}}/fa/3/about.html
394+ HTTP 404
395+ [Asserts]
396+ header "Surrogate-Key" == "fa/3"
397+
398+ GET {{host}}/fa/3.14/
399+ HTTP 404
400+ [Asserts]
401+ header "Surrogate-Key" == "fa/3.14"
402+
403+ GET {{host}}/fa/3.14/about.html
404+ HTTP 404
405+ [Asserts]
406+ header "Surrogate-Key" == "fa/3.14"
407+
408+ GET {{host}}/fa/dev/
409+ HTTP 404
410+ [Asserts]
411+ header "Surrogate-Key" == "fa/dev"
412+
413+ GET {{host}}/fa/dev/about.html
414+ HTTP 404
415+ [Asserts]
416+ header "Surrogate-Key" == "fa/dev"
417+
388418GET {{host}}/fr/3/
389419HTTP 404
390420[Asserts]
You can’t perform that action at this time.
0 commit comments