Skip to content

Commit

Permalink
Fix acceptance tests with latests flask and werkzeug
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulBrandUWV authored and lucagiove committed May 6, 2024
1 parent eb4259c commit b3f602e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion atests/http_server/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,6 @@ def redirect_to():
status_code = int(args["status_code"])
if status_code >= 300 and status_code < 400:
response.status_code = status_code
response.headers["Location"] = args["url"].encode("utf-8")
response.headers["Location"] = args["url"]

return response
5 changes: 2 additions & 3 deletions atests/http_server/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
import time
import os
from hashlib import md5, sha256, sha512
from werkzeug.http import parse_authorization_header
from werkzeug.datastructures import WWWAuthenticate
from werkzeug.datastructures import WWWAuthenticate, Authorization

from flask import request, make_response
from six.moves.urllib.parse import urlparse, urlunparse
Expand Down Expand Up @@ -357,7 +356,7 @@ def check_digest_auth(user, passwd):
"""Check user authentication using HTTP Digest auth"""

if request.headers.get('Authorization'):
credentials = parse_authorization_header(request.headers.get('Authorization'))
credentials = Authorization.from_header(request.headers.get('Authorization'))
if not credentials:
return
request_uri = request.script_root + request.path
Expand Down

0 comments on commit b3f602e

Please sign in to comment.