mrutkows commented on a change in pull request #83: Fix bug in knative raw
handler
URL:
https://github.com/apache/openwhisk-runtime-docker/pull/83#discussion_r385260561
##########
File path: core/actionProxy/owplatform/knative.py
##########
@@ -108,15 +108,15 @@ def preProcessHTTPContext(msg, valueData):
tmpBody = msg.get('value', {})
removeInitData(tmpBody)
bodyStr = str(tmpBody)
- valueData['__ow_body'] = base64.b64encode(bodyStr)
+ valueData['__ow_body'] = base64.b64encode(bodyStr.encode())
valueData['__ow_query'] = flask.request.query_string
namespace = ''
if '__OW_NAMESPACE' in os.environ:
namespace = os.getenv('__OW_NAMESPACE')
valueData['__ow_user'] = namespace
valueData['__ow_method'] = flask.request.method
- valueData['__ow_headers'] = flask.request.headers
+ valueData['__ow_headers'] = { k: v for k, v in
flask.request.headers.items() }
Review comment:
This seems less like a typo and more like an dictionary copy/conversion
issue... could you clarify?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services