Re: [whatwg/fetch] Streaming upload (Issue #1438)

@yutakahirano mentioned:
> [TPAC 2019](https://docs.google.com/document/d/1q090ovJ4gd8wSfVtvuoZLMZ51YkiFDsEZ0Jiqi41Iys/edit#)

Reading the protocol (search for "fetch#425"), I see you discussed the authentication error case that [I mentioned here as well](https://github.com/whatwg/fetch/issues/1438#issuecomment-1161595934): "
[annevk] same for authentication challenge? other things that would cause multiple requests?
[yutaka]: ok, I'm fine to implement in this case
"
I'm not sure I understand your response "ok to implement this case" correctly. Were you saying that you would ensure that a 401 is handled and passed on immediately? As a special case?

In your API proposal, how exactly would that look like for a caller? I start a live streaming upload, e.g. a meeting recording, or a security camera feed upload, and the server says 401. If I receive the 401 error only after the stream ends, we have data loss.

In other words, whatever the API, the browser cannot sit on server errors, but needs to report them back as soon as the server sends them. Streams are unnecessary for a few KB, but they can be very long, even hours of upload. To ignore errors and pass them on only after the stream ends, is way too late, causes useless re-transmisssion of large files at best, or even data loss. I cannot see any other solution than what I proposed. Or maybe you have something in mind how to solve this?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/1438#issuecomment-1161807821
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/issues/1438/1161807821@github.com>

Received on Tuesday, 21 June 2022 14:16:47 UTC