зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1429045 - Fix http status test to return in the right places, r=Ms2ger
This was a regression from bug 1396534 MozReview-Commit-ID: 9Yfdo2rGqVZ
This commit is contained in:
Родитель
2ee0759587
Коммит
651dd079ef
|
@ -6,10 +6,12 @@ def main(request, response):
|
|||
if "authorization" not in request.headers:
|
||||
response.status = 401
|
||||
response.headers.set("WWW-Authenticate", "Basic")
|
||||
return
|
||||
else:
|
||||
auth = request.headers.get("Authorization")
|
||||
if auth != "Basic dGVzdHVzZXI6dGVzdHBhc3M=":
|
||||
response.set_error(403, "Invalid username or password - " + auth)
|
||||
return
|
||||
|
||||
response.status = 301
|
||||
response.headers.set("Location", image_url)
|
||||
|
|
Загрузка…
Ссылка в новой задаче