dubeejw commented on a change in pull request #2741: Display content-type in
__ow_headers for web actions
URL:
https://github.com/apache/incubator-openwhisk/pull/2741#discussion_r139495911
##########
File path:
tests/src/test/scala/whisk/core/controller/test/WebActionsApiTests.scala
##########
@@ -1354,9 +1356,8 @@ trait WebActionsApiTests extends ControllerTestCommon
with BeforeAndAfterEach wi
*
*/
- Post(s"$testRoutePath/$systemId/proxy/export_c.json", str) ~> addHeader(
- "Content-type",
- ContentTypes.`text/html(UTF-8)`.value) ~> Route.seal(routes(creds)) ~>
check {
+ Post(s"$testRoutePath/$systemId/proxy/export_c.json",
HttpEntity(ContentTypes.`text/html(UTF-8)`, str)) ~> Route
+ .seal(routes(creds)) ~> check {
Review comment:
Just maintaining the previous functionality as the content-type use to be
set with `addHeader()`. If the content-type isn't set explicitly, the received
content-type ends up being `text/plain; charset=UTF-8` instead of text/html;
charset=UTF-8`.
Got rid of all the calls that didn't need the content-type set explicitly.
----------------------------------------------------------------
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