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

Handle empty content-type from IE11 in capture endpoint #3178

Merged
merged 1 commit into from
Feb 3, 2021

Conversation

macobo
Copy link
Contributor

@macobo macobo commented Feb 3, 2021

When posting gzipped data from posthog-js (gzip-js), all browsers except
IE11 send content-type as 'text/plain'. IE11 has a bug
(jimmywarting/FormData#44) where it fails to
do that, causing us to dismiss these events.

This only occurs when using bin/docker-server and not bin/start-backend.

Related PR: PostHog/posthog-js#180

Checklist

  • All querysets/queries filter by Organization, by Team, and by User
  • Django backend tests
  • Jest frontend tests
  • Cypress end-to-end tests

@macobo macobo requested a review from EDsCODE February 3, 2021 11:14
@timgl timgl temporarily deployed to posthog-capture-content-d68rrs February 3, 2021 11:17 Inactive
@macobo macobo mentioned this pull request Feb 3, 2021
2 tasks
@macobo macobo force-pushed the capture-contenttype-ie11 branch from 30f925d to b35a67a Compare February 3, 2021 15:28
@macobo macobo temporarily deployed to posthog-capture-content-d68rrs February 3, 2021 15:28 Inactive
When posting gzipped data from posthog-js (gzip-js), all browsers except
IE11 send content-type as 'text/plain'. IE11 has a bug
(jimmywarting/FormData#44) where it fails to
do that, causing us to dismiss these events.

This only occurs when using bin/docker-server and not bin/start-backend.

Related PR: PostHog/posthog-js#180
@macobo macobo force-pushed the capture-contenttype-ie11 branch from b35a67a to 926177d Compare February 3, 2021 15:31
@macobo macobo temporarily deployed to posthog-capture-content-d68rrs February 3, 2021 15:31 Inactive
Copy link
Member

@EDsCODE EDsCODE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm if test passes

@macobo macobo merged commit 046eda5 into master Feb 3, 2021
@macobo macobo deleted the capture-contenttype-ie11 branch February 3, 2021 16:01
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

Successfully merging this pull request may close these issues.

3 participants