The problem became substantial when the swagger.json is accessed through an API gateway (e.g. AWS load balancer) where proper content-length header is required to properly close the connection.
Without this fix, the following warning is shown on the Play console when the swagger json is requested.
[WARN] [05/24/2018 18:03:09.086] [play-dev-mode-akka.actor.default-dispatcher-2] [akka.actor.ActorSystemImpl(play-dev-mode)] Explicitly set HTTP header 'Content-Length: 11163' is ignored, explicitContent-Lengthheader is not allowed. Use the appropriate HttpEntity subtype.
Use correct HttpEntity to report Content-Length.
The problem became substantial when the swagger.json is accessed through an API gateway (e.g. AWS load balancer) where proper content-length header is required to properly close the connection.
Without this fix, the following warning is shown on the Play console when the swagger json is requested.
[WARN] [05/24/2018 18:03:09.086] [play-dev-mode-akka.actor.default-dispatcher-2] [akka.actor.ActorSystemImpl(play-dev-mode)] Explicitly set HTTP header 'Content-Length: 11163' is ignored, explicit
Content-Lengthheader is not allowed. Use the appropriate HttpEntity subtype.