Looking at [the source of the recorder[(https://github.com/getsentry/responses/blob/9ea86fe6af7626e7b270e128b1e8c521c013d948/responses/_recorder.py#L150C39-L156C10), it does not record the content_type of the actual request, and instead synthesizes [it to "text/plain; charset=utf-8" instead]("text/plain; charset=utf-8").
This is wrong, as we loose the content_type image/tiff that the server sends and which we require.
Hour workaround is fairly ugly right now, and looks approximately like this:
if (len(responses.registered())>2 and
responses.registred()[1].url.endswith("something_specific")):
responses.registered()[1].content_type="image/tiff"
We would be happy to provide a pull request, please indicate if you would like to take it.
Looking at [the source of the recorder[(https://github.com/getsentry/responses/blob/9ea86fe6af7626e7b270e128b1e8c521c013d948/responses/_recorder.py#L150C39-L156C10), it does not record the content_type of the actual request, and instead synthesizes [it to
"text/plain; charset=utf-8"instead]("text/plain; charset=utf-8").This is wrong, as we loose the
content_typeimage/tiffthat the server sends and which we require.Hour workaround is fairly ugly right now, and looks approximately like this:
We would be happy to provide a pull request, please indicate if you would like to take it.