Skip to content

Commit 72f6ddd

Browse files
committed
Updated http_wsgi
1 parent 5c97f07 commit 72f6ddd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

azure/functions/_http_wsgi.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Copyright (c) Microsoft Corporation. All rights reserved.
22
# Licensed under the MIT License.
3-
from typing import Dict, List, Optional, Any
43
import logging
54
from io import BytesIO, StringIO
65
from os import linesep
6+
from typing import Dict, List, Optional, Any
77
from urllib.parse import ParseResult, urlparse, unquote_to_bytes
88
from wsgiref.headers import Headers
99

@@ -12,9 +12,7 @@
1212

1313

1414
def wsgi_encoding_dance(value):
15-
if isinstance(value, str):
16-
return value.encode("latin-1")
17-
return value
15+
return value.encode().decode("latin1")
1816

1917

2018
class WsgiRequest:

0 commit comments

Comments
 (0)