From e9407a3bb12b492b86ae4b79672db9540ebbb7ca Mon Sep 17 00:00:00 2001 From: JrongTru <30858019+JrongTru@users.noreply.github.com> Date: Fri, 30 Jul 2021 16:49:09 +0800 Subject: [PATCH] Update helpers.py To enhance the robustness of the code, regardless of the request.query_string Whether the string is bytes or string can be used with request.uri. --- httpbin/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpbin/helpers.py b/httpbin/helpers.py index b29e1835..f691019a 100644 --- a/httpbin/helpers.py +++ b/httpbin/helpers.py @@ -361,7 +361,7 @@ def check_digest_auth(user, passwd): return request_uri = request.script_root + request.path if request.query_string: - request_uri += '?' + request.query_string + request_uri += '?' + str(request.query_string, 'utf-8') response_hash = response(credentials, passwd, dict(uri=request_uri, body=request.data, method=request.method))