fediverse-devnet / feditest-tests-fediverse

The tests for the fediverse testsuite
MIT License
5 stars 4 forks source link

Don't do content type checks on error responses #100

Closed steve-bate closed 1 week ago

steve-bate commented 2 weeks ago

I don't think we should be enforcing a specific content type (or limit the content types) on HTTP error responses. I don't see a requirement for that in RFC 7033 or RFC 2616.

For example, Drupal returns application/jrd+json with content {} (a valid JRD) for at least some 4xx responses. I think that should not be considered a failure, even though it's an "interesting" choice.

If we are going to do any checks, it would be reasonable to verify that an application/jrd+json is a valid JRD or application/json can be parsed as JSON. The same could be done for HTML and other content types, but that seems a little extreme.

jernst commented 1 week ago

I think we are done with this. Is that correct @steve-bate ?

steve-bate commented 1 week ago

I haven't specifically tested it recently, but I'll take your word for it. ;-)