Skip to content

Remove header content-type on empty responses #475

Description

@Syndesi

On create requests, e.g.:

curl \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"type": "Demo", "data": {"hello": "world :D"}}' \
  https://api.localhost/

the API answers with these headers:

Access-Control-Allow-Headers: Authorization, Origin, X-Requested-With, Content-Type, Accept, Access-Control-Request-Method
Access-Control-Allow-Methods: GET, HEAD, POST, OPTIONS, PUT, PATCH, DELETE, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: ETag, Location
Allow: GET, HEAD, POST, OPTIONS, PUT, PATCH, DELETE, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK
Cache-Control: no-cache, private
Content-Type: text/html; charset=UTF-8
Date: Mon, 09 Oct 2023 20:32:13 GMT
Location: /455a89b9-4ec7-4b02-b023-bcfbcbba9a9f
Transfer-Encoding: chunked
X-Powered-By: Ember Nexus API

Note that Content-Type: text/html; charset=UTF-8 is sent. This should not be the case; the header should be removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugAddressing unexpected issues.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions