Skip to content

v3 Regression: POST responses no longer contain Content-Type header #421

@jethron

Description

@jethron

In v2 of the Collector, the "ok" response for POST requests to the standard tp2 endpoint returned a content-type: text/plain; charset=UTF-8 header.
In v3 this is does not occur.

This is usually fine, however in Firefox when tracking events via the JS or Browser SDKs (which use the XMLHttpRequest API) this results in Firefox presuming the context is XML (see note at overrideMimeType()) and attempting to parse the response text as such. It then triggers a console warning for this error for every payload sent.
image

image

In theory this could be fixed in the Trackers using overrideMimeType but per RFC9110:

A sender that generates a message containing content SHOULD generate a Content-Type header field in that message unless the intended media type of the enclosed representation is unknown to the sender.

So I'm considering it technically a regression and filing it here; let me know if you think it should be fixed in trackers instead, though.

See also: Zendesk ticket #40067

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