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
AJAX request headers are lost when using window.fetch #323
Comments
I did some more digging around. It's only broken when you call fetch with If you call fetch with two parameters |
//cc @jiripudil |
Thanks for great report! |
dg
added a commit
that referenced
this issue
Feb 15, 2019
dg
added a commit
that referenced
this issue
Feb 15, 2019
dg
added a commit
that referenced
this issue
Feb 15, 2019
dg
added a commit
that referenced
this issue
Feb 17, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version: 2.5.3
Bug Description
When Tracy modifies window.fetch in captureAjax, it losses original header information.
I suppose it's because options.headers in fetch isn't a standart object.
This will show empty object in dev console (chrome), even if some headers are set:
But this will print out headers names:
Steps To Reproduce
Send simple fetch request with some additional headers set, eg.
X-Requested-With: XMLHttpRequest
.Here is simple code snippet you can run from browser dev console. It might 404, but that doesn't matter. Run the code and then look at the request in dev tools network tab.
When Tracy is running, there will be only one header set by Tracy.
When Tracy is not running, there will headers originally passed to fetch.
Expected Behavior
Headers won't disappear from window.fetch requests.
At least please disable captureAjax for window.fetch till it's fixed, Because right now it's useless anyway. It's used mostly/only for ajax requests, but it will strip away the information which tells the server this is ajax request.
The text was updated successfully, but these errors were encountered: