Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jethron opened this issue Apr 4, 2024 · 0 comments
Open

Comments

@jethron
Copy link

jethron commented Apr 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant