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

CONNECT description in Semantics is a bit 1.1 specific #183

Closed
quasicomputational opened this issue Dec 1, 2018 · 9 comments
Closed

CONNECT description in Semantics is a bit 1.1 specific #183

quasicomputational opened this issue Dec 1, 2018 · 9 comments
Assignees

Comments

@quasicomputational
Copy link

The description of the CONNECT methods in Semantics (section 7.3.6) is has some HTTP/1.1 specific language in it: "Any 2xx (Successful) response indicates that the sender (and all inbound proxies) will switch to tunnel mode immediately after the blank line that concludes the successful response's header section; data received after that blank line is from the server identified by the request-target."

Relatedly, there's no description of CONNECT in the Messaging draft.

@wtarreau
Copy link

wtarreau commented Dec 1, 2018

I think it would be useful to explain it differently, that basically CONNECT method creates a tunnel, that it doesn't carry any payload in either direction, and that they payload is replaced with the bidirectional stream of bytes. As such it behaves as if there was an infinite payload in parallel in both directions. That should help map it better on top of H1 and H2 : for H1 it starts with the first byte following the empty line ; for H2 it implies it's transported over DATA frames.

@LPardue
Copy link
Contributor

LPardue commented Dec 1, 2018

Agree with @wtarreau.

I think in the HTTP/3 draft there was an issue raised that the tunnel doesn't forward packets but instead exchanges transport PDU payload

@MikeBishop
Copy link
Contributor

During our discussion about message boundary delineation, I came to a similar conclusion that CONNECT doesn't happen after an HTTP message requesting the tunnel, it's a request with a body of unknown size which MUST be processed in a streaming fashion.

@wtarreau
Copy link

wtarreau commented Dec 4, 2018

@MikeBishop you're right, it's not after an HTTP message because its content-length must be ignored, which means that the tunnel doesn't start after any supposed payload but really after the headers. From an implementation perspective, I like to see it as infinite payload for request and response because it usually more or less matches the way the frames (or byte streams) have to be handled.

@mnot mnot added the semantics label Dec 18, 2018
@awwright
Copy link

... for H2 it implies it's transported over DATA frames.

Wouldn't this imply that if I added Transfer-Encoding: chunked to a CONNECT request, that the server would have to decode the chunked encoding before getting to raw tunnel data?

@mnot
Copy link
Member

mnot commented Apr 27, 2020

Waiting for #340.

@mnot mnot added the waiting label Apr 27, 2020
@mnot mnot removed the waiting label May 28, 2020
@mnot
Copy link
Member

mnot commented May 28, 2020

This seems to have been dealt with in other issues; the text in Semantics now looks pretty version-neutral.

Messaging doesn't have a dedicated section about CONNECT, but does mention it in 6.3 Message Body Length; does it need more than that?

@wtarreau
Copy link

I think we're good as is.

@mnot
Copy link
Member

mnot commented Jun 3, 2020

Closing; if anyone sees something, please ask for reopening, or file another issue.

@mnot mnot closed this as completed Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

6 participants