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

processResponseConsumeBody and opaque responses #1446

Closed
annevk opened this issue May 31, 2022 · 4 comments
Closed

processResponseConsumeBody and opaque responses #1446

annevk opened this issue May 31, 2022 · 4 comments
Labels
clarification Standard could be clearer

Comments

@annevk
Copy link
Member

annevk commented May 31, 2022

I noticed today that fetching scripts in HTML uses this and while it currently seemingly ignores the second argument that seems like a bug as the body on which it tries to operate will have been consumed.

However, it might be somewhat surprising we end up revealing the full byte sequence of opaque responses to callers without any kind of ceremony.

Not really sure how to address this other than add some "be careful" words around this.

@noamr @domenic thoughts?

@annevk annevk added the clarification Standard could be clearer label May 31, 2022
@domenic
Copy link
Member

domenic commented May 31, 2022

The use of processResponseConsumeBody in script fetching is quite recent and is part of a general slow movement toward updating things to use the new Fetch callbacks. We indeed do not seem to be using it quite correctly.

For the more general question, I agree there's not much to be done here besides adding "be careful" wording. E.g., <img> and stylesheet probably also need access to the raw bytes, at least for some part of the spec. And then they just need to guard any web-developer-exposed access behind the opaqueness.

@noamr
Copy link
Contributor

noamr commented May 31, 2022

If the HTML/CSS specs need to support no-cors fetches, then they also need access to the response body...
As long as the bytes are not exposed directly to the web developer, I don't see what's missing and how another warning would add to the current documentation of what opaque responses are about...

@annevk
Copy link
Member Author

annevk commented Jun 15, 2022

I think there's two things that are wrong here:

#1413 should land first though.

@annevk
Copy link
Member Author

annevk commented Oct 24, 2022

Let's close this in favor of #1511 and #1512.

@annevk annevk closed this as completed Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer
Development

No branches or pull requests

3 participants