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

content-type in csp report on fetch is missed #1449

Closed
maxkuzmin opened this issue Jul 15, 2019 · 2 comments
Closed

content-type in csp report on fetch is missed #1449

maxkuzmin opened this issue Jul 15, 2019 · 2 comments

Comments

@maxkuzmin
Copy link

maxkuzmin commented Jul 15, 2019

When csp report is initiated by browser and fetched by service worker, content-type header of request is missing for some reason. I created a demo page.
Being on loaded page, please open network, filter request by "report" substring and reload the page. You will see 4 requests:

  • report1 xhr
  • report csp
  • report1 fetch
  • report fetch

report1 is called manually from javascript (new XMLHttpRequest()...), report - by browser because of csp rule violation.
Both report1 xhr and report csp calls have "Content-Type: application/csp-report" provisional request header. However, only report1 fetch has such header, report1 fetch lacks the Content-Type header.

Tested in latest Chrome and Firefox.

@jakearchibald
Copy link
Contributor

This sounds like a browser bug. Can you file it in the browser trackers?

@bathos
Copy link

bathos commented Mar 10, 2020

Although this is not a SW-spec issue, very grateful that Google turned up this confirmation that I’m not just losing my mind.

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

3 participants