cdent / gabbi

Declarative HTTP Testing for Python and anything else
http://gabbi.readthedocs.org/
Other
148 stars 34 forks source link

Display response body when no content-type #285

Closed cdent closed 3 years ago

cdent commented 3 years ago

When the response has no content-type and verbose is true gabbi was not displaying the response body. This is because when no content-type is known, it was assuming a binary content-type. Now it assumes text/plain.

This comes with the risk that in some rare cases verbosity might spew data all over the screen if there is a very big or very binary response when no content-type is set. With luck this will encourage servers to send a content-type.

An external test, in the form of test-verbosity.sh is added. This was one of several ways of verifying the output.

Addresses #282

cdent commented 3 years ago

This might be too simplistic, or it might be fine. Can't decide.