pwplusnick 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_r385264208
 
 

 ##########
 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:
   Typing as in type system, rather than typing as in typo. It was the last 
thing I tested and I forgot to commit before I pushed.

----------------------------------------------------------------
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

Reply via email to