dubeejw commented on issue #2690: content-type header missing in web action 
headers
URL: 
https://github.com/apache/incubator-openwhisk/issues/2690#issuecomment-329050514
 
 
   Could do something like this if we want to exclude the `none/none` 
content-type.
   
   ```
   val headers = ctx.request.headers ++ 
getContentType(ctx.request.entity.contentType)
   ```
   
   ```
   private def getContentType(contentType: ContentType) = {
       contentType match {
         case x if x == ContentType(MediaType.customBinary("none", "none", 
MediaType.NotCompressible)) => Seq()
         case _ => Seq(RawHeader(`Content-Type`.lowercaseName, 
contentType.toString))
       }
     }
   ```
 
----------------------------------------------------------------
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