markusthoemmes commented on a change in pull request #2676: Change response 
when entity is empty from 200 to 204.
URL: 
https://github.com/apache/incubator-openwhisk/pull/2676#discussion_r136340753
 
 

 ##########
 File path: 
core/controller/src/main/scala/whisk/core/controller/WebActions.scala
 ##########
 @@ -216,32 +216,48 @@ protected[core] object WhiskWebActionsApi extends 
Directives {
                 case _ => throw new Throwable("Invalid header")
             } getOrElse List()
 
+            val body = fields.get("body")
+
             val code = fields.get(rp.statusCode).map {
                 case JsNumber(c) =>
                     // the following throws an exception if the code is
                     // not a whole number or a valid code
                     StatusCode.int2StatusCode(c.toIntExact)
 
                 case _ => throw new Throwable("Illegal code")
-            } getOrElse (OK)
+            }
+
+            body map {
+                case JsString(str) =>
 
 Review comment:
   Meh. You're right of course. Worth it? (The last version?)
 
----------------------------------------------------------------
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