@vercel/python 6.1.4 → 6.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vc_init.py +12 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/python",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.6",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"fs-extra": "11.1.1",
|
|
27
27
|
"jest-junit": "16.0.0",
|
|
28
28
|
"which": "3.0.0",
|
|
29
|
-
"@vercel/build-utils": "13.2.
|
|
29
|
+
"@vercel/build-utils": "13.2.4"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build": "node ../../utils/build-builder.mjs",
|
package/vc_init.py
CHANGED
|
@@ -825,7 +825,18 @@ elif 'app' in __vc_variables:
|
|
|
825
825
|
)
|
|
826
826
|
|
|
827
827
|
status_code = message['status']
|
|
828
|
-
|
|
828
|
+
raw_headers = message.get('headers', [])
|
|
829
|
+
|
|
830
|
+
# Headers from werkzeug transform bytes header value
|
|
831
|
+
# from b'value' to "b'value'" so we need to process
|
|
832
|
+
# ASGI headers manually
|
|
833
|
+
decoded_headers = []
|
|
834
|
+
for key, value in raw_headers:
|
|
835
|
+
decoded_key = key.decode() if isinstance(key, bytes) else key
|
|
836
|
+
decoded_value = value.decode() if isinstance(value, bytes) else value
|
|
837
|
+
decoded_headers.append((decoded_key, decoded_value))
|
|
838
|
+
|
|
839
|
+
headers = Headers(decoded_headers)
|
|
829
840
|
|
|
830
841
|
self.on_request(headers, status_code)
|
|
831
842
|
self.state = ASGICycleState.RESPONSE
|