-
Notifications
You must be signed in to change notification settings - Fork 341
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
New Resource Timing issues #1201
Comments
In "fetch finale" we attach the timing info to the response. Intermediate redirect responses don't get that, so their But I do see what you're saying, that |
Only call processResponseDone for responses that have their timing info set, which are responses that have passed CORS and redirects. Closes whatwg#1201
From IRC:
And note that in this case the network error is due to CORS. I think we should either report all network errors or none of them. Doing this would also require some kind of integration with "fetch finale" as only there do we know if a response became a network error. |
OK this is actually my oversight, CORS errors should be reported as an RT entry, but with some of the metrics zeroed. I'll post a PR to that effect. |
#1202 addresses both issues now. |
Only call processResponseDone for responses that have their timing info set, which are responses that have passed CORS and redirects. Closes whatwg#1201
Only call processResponseDone for responses that have their timing info set, which are responses that have passed CORS and redirects. Closes whatwg#1201
Part of this was split into #1215. |
Only call processResponseDone for responses that have their timing info set, which are responses that have passed CORS and redirects. Closes whatwg#1201
And hand processResponseDone a response. Resource Timing PR: w3c/resource-timing#266. Closes #1201. Follow-up: #1215.
@noamr when looking at whatwg/xhr#319 I started looking at
fetch()
again and I don't understand a couple things. Let's start with this bit:Where does response come from here? I guess https://fetch.spec.whatwg.org/#finalize-response has to pass it on.
How does this interact with callers of HTTP-network fetch that might take this response and determine to return a network error to the caller of fetch?
Another problem here is that this might not be the final response. We end up calling these things for redirects and such too.
One way to potentially solve this is that in "fetch finale" we declare that this response is the one we need to hear about in terms of a done callback.
I suppose if "fetch finale" got a network error we could at that point invoke "done" as well, if it should happen for network errors. Do you get an entry if there's a CORS failure? I'm not sure that's currently adequately covered.
The text was updated successfully, but these errors were encountered: