-
Notifications
You must be signed in to change notification settings - Fork 36
Description
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.
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