Skip to content

Content-Type check is too restrictive in "TestRegistration/parallel/POST_{}_returns_a_set_of_flows" #696

Open
@MTRNord

Description

@MTRNord

Headers: map[string]string{
"Content-Type": "application/json",
},

In "TestRegistration/parallel/POST_{}_returns_a_set_of_flows" the test strictly required application/json. It's common for many servers to return also a charset in the content type, which is valid according to HTTP. However, complement considers this as a failure which I discovered while testing https://github.com/MTRNord/persephone :)

❌ TestRegistration/parallel/POST_{}_returns_a_set_of_flows (0s)
apidoc_register_test.go:48: MatchResponse got Content-Type: application/json; charset=utf-8 want application/json - http://127.0.0.1:32819/_matrix/client/v3/register => {"flows":[{"stages":["m.login.dummy"]}],"session":"Kbxte1cyWasGZdeIeBsf9FJax"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions