mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Update web-platform-tests to revision 122a4672fa0dc554a6e7528fa3487fd907c792ee
This commit is contained in:
parent
fb1123495f
commit
93d826f7ba
301 changed files with 4775 additions and 1769 deletions
|
@ -38,16 +38,17 @@ def main(request, response):
|
|||
|
||||
if "location" in request.GET:
|
||||
url = request.GET['location']
|
||||
scheme = urlparse(url).scheme
|
||||
if scheme == "" or scheme == "http" or scheme == "https":
|
||||
url += "&" if '?' in url else "?"
|
||||
#keep url parameters in location
|
||||
url_parameters = {}
|
||||
for item in request.GET.items():
|
||||
url_parameters[item[0]] = item[1][0]
|
||||
url += urlencode(url_parameters)
|
||||
#make sure location changes during redirection loop
|
||||
url += "&count=" + str(stashed_data['count'])
|
||||
if "simple" not in request.GET:
|
||||
scheme = urlparse(url).scheme
|
||||
if scheme == "" or scheme == "http" or scheme == "https":
|
||||
url += "&" if '?' in url else "?"
|
||||
#keep url parameters in location
|
||||
url_parameters = {}
|
||||
for item in request.GET.items():
|
||||
url_parameters[item[0]] = item[1][0]
|
||||
url += urlencode(url_parameters)
|
||||
#make sure location changes during redirection loop
|
||||
url += "&count=" + str(stashed_data['count'])
|
||||
headers.append(("Location", url))
|
||||
|
||||
if "redirect_referrerpolicy" in request.GET:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue