-
Notifications
You must be signed in to change notification settings - Fork 313
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
Provide opt-in to avoid request body duplication #533
Comments
From @annevk in #whatwg: If a redirect is hit, the request gets replayed to the new URL, this means that the request body gets buffered whether it needs to be or not. This may be undesirable/unworkable for large uploads, we may want to consider an option to fail-on-redirect, or prevent-buffering. |
So, if we want to retry on such a failure on |
@tyoshino I don't really see another way of preventing the duplication. You? Files will become very large going forward, or are we not concerned about that? |
@annevk I'm not objecting to the idea. It makes sense. Just trying to understand manual retry story. |
The idea would be that before you do something like this you ensure it's going to work. So network is up, you know the URL will not redirect, and then you start transferring this huge stream of data. If it does go wrong, it probably depends a bit on where the data came from originally how you want to recover. |
@annevk OK. Thanks. |
/cc @yutakahirano |
So when I added The other avenue for a repeated request is HTTP authentication. Now normal HTTP authentication is not a problem as that is disabled in |
(It might be better to move this issue to https://github.com/whatwg/fetch at this point... I'd like to stop using this repository for Fetch issues.) |
On network with small RTT, it might be ok to:
Can we use 100 continue or something to carry this kind of signal (It seems the final HTTP2 spec allows 100 continue)? For large RTT network, it would be big loss if we don't start sending data until we receive a response (we shouldn't assume the underlying connection is TCP. Now we have HTTP2, etc.). |
So that would be a protocol addition to enable something similar to this with the server controlling behavior. That might be good to support in due course and probably warrants a distinct ticket (against whatwg/fetch) and coordination with @mnot and cohorts. However, my open question is about letting the client decide. That is, what should do about the situation where apart from proxy authentication we know no teeing would be needed? |
It sounds like you're talking about expect/continue: |
Thanks! Indeed that seems sufficient for a negotiated version of this with some kind of opt-in flag passed to |
Opened two issues. One for the protocol-based version and one for the client decides version:
Closing this one. Other Fetch stream concerns are tracked by this repository by the way: |
Once streams land, we want support in fetch. This issues tracks that and is a home for considerations.
The text was updated successfully, but these errors were encountered: