mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-13 21:02:25 +03:00
Return correct Content-Type for unrecognized requests (#3355)
Fixes #3354
This commit is contained in:
parent
b732eede27
commit
8aa088f713
2 changed files with 4 additions and 4 deletions
|
@ -17,7 +17,7 @@ func TestRoutersError(t *testing.T) {
|
|||
if rec.Code != http.StatusNotFound {
|
||||
t.Fatalf("unexpected status code: %d - %s", rec.Code, rec.Body.String())
|
||||
}
|
||||
if ct := rec.Header().Get("Content-Type"); ct != "application/json" {
|
||||
if ct := rec.Result().Header.Get("Content-Type"); ct != "application/json" {
|
||||
t.Fatalf("unexpected content-type: %s", ct)
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ func TestRoutersError(t *testing.T) {
|
|||
if rec.Code != http.StatusMethodNotAllowed {
|
||||
t.Fatalf("unexpected status code: %d - %s", rec.Code, rec.Body.String())
|
||||
}
|
||||
if ct := rec.Header().Get("Content-Type"); ct != "application/json" {
|
||||
if ct := rec.Result().Header.Get("Content-Type"); ct != "application/json" {
|
||||
t.Fatalf("unexpected content-type: %s", ct)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue