When sending a literal empty response, Flask does not include a ContentType in the response. While in many cases, we don't need need a ContentType nor expect one on the API client, Apache webserver can treat this as an error and generate an Error indicating a Bad Gateway. When doing this, we also now include an empty JSON body in the response for 202 messages. For 204 message errors, the message body is expected to be empty. However, when this Bad Gateway error occurs, the API/Conductor were proceeding like there was no issue. The API client on the other hand thinks that a hard failure has occured. Also adds some additional catches to provide additional logging which turned out not to be needed in this case, but it would be useful for others. Change-Id: If2e7697e3fde58ab0a4193787e29d3acdca81ebfchanges/44/740344/10
parent
a1f8926cd1
commit
6e2cb60e77
@ -0,0 +1,9 @@ |
||||
--- |
||||
fixes: |
||||
- | |
||||
Fixes an issue which may occur with Apache httpd webservers acting as a |
||||
proxy where the server may report ``Bad Gateway``, however inspector |
||||
continues operating as if there was no problem. This was due to a |
||||
lack of a ``Content-Type`` header on HTTP 202 and 204 replies, |
||||
and lack of message body with HTTP 202 messages which Apache httpd |
||||
can error upon. |
||||
Loading…
Reference in new issue