rabbah commented on a change in pull request #2717: Ensure that base64 encoded 
'+json' bodies are accepted and decoded.
URL: 
https://github.com/apache/incubator-openwhisk/pull/2717#discussion_r138669510
 
 

 ##########
 File path: 
core/controller/src/main/scala/whisk/core/controller/WebActions.scala
 ##########
 @@ -304,11 +317,13 @@ protected[core] object WhiskWebActionsApi extends 
Directives {
     findContentTypeInHeader(headers, transid, `text/html`).flatMap { mediaType 
=>
       val ct = ContentType(mediaType, () => HttpCharsets.`UTF-8`)
       ct match {
-        case _: ContentType.Binary | ContentType(`application/json`, _) =>
-          // base64 encoded json response supported for legacy reasons
-          Try(Base64.getDecoder().decode(str)).map(HttpEntity(ct, _))
+        // base64 encoded json response supported for legacy reasons
 
 Review comment:
   
   
   is this clearer?
   
   // base64 encoded json will appear as non-binary but it is excluded here for 
legacy reasons
   
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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