Re: [whatwg/fetch] Streaming upload and HTTP protocol info leak (#1007)

> Let me re-summarize the chart:
> 
> ## Same-origin case:
> 1. If the response to the main resource used HTTP/0.9 or HTTP/1.0:
>    Fail the request.
> 2. if the response used HTTP/1.1:
>    
>    1. If `allowHTTP1ForStreamingUpload` is `true` (default):
>       Continue processing
>    2. If `alowHTTP1ForStreamingUpload` is `false`:
>       Fail the request

I’m not sure why a dependency on the previous request is being made? The new request should more or less be independent.

If it’s trying to avoid protocol leaks, they still happen in this model, because the client only sees the protocol to the intermediary and the server only sees the protocol from the intermediary, and they’re not necessarily the same. It seems like this can just be:

* If you have 0 connections in the connection pool
  * make a new connection
* If you have an H/2 or H/3 connection established
  * Use it
* If the flag is not set / is false
  * Fail the request
* If the flag is set
  * Attempt the request (which may result in a 1.1, 1.0, or 0.9 response)

I’m not sure why the distinction here on 1.0 / 0.9 responses, because it’s the request that’s sending the chunked encoding. Am I missing something basic?

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

Received on Wednesday, 22 April 2020 13:55:03 UTC