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: consider using ALPN registry for the :protocol values. #471

Closed
PiotrSikora opened this Issue Jan 16, 2018 · 5 comments

Comments

Projects
None yet
5 participants
@PiotrSikora
Copy link

PiotrSikora commented Jan 16, 2018

Please consider using the ALPN protocol IDs registry instead of the HTTP Upgrade token registry for the :protocol values in HTTP/2 extended CONNECT method, since it's more appropriate for the use case.

The only downside is that there is no "websocket" ALPN value, but that could be easily added.

Also, we should add "bytes" / "bytestream" to the registry, for the purpose of proxying arbitrary TCP connections over HTTP/2.

cc @mcmanus

@wtarreau

This comment has been minimized.

Copy link

wtarreau commented Jan 17, 2018

IMHO this would not be logical. CONNECT and Upgrade are really similar in that they are used to transport something over HTTP, and that something may very well be a TLS stream which itself contains its own ALPN.

Anyway this should be discussed on the mailing list, not via issues here.

@mcmanus

This comment has been minimized.

Copy link
Contributor

mcmanus commented Mar 21, 2018

discussed in london/101 and decided to not make a change

@mcmanus mcmanus closed this Mar 21, 2018

@PiotrSikora

This comment has been minimized.

Copy link
Author

PiotrSikora commented Mar 23, 2018

Sounds good, thanks for bringing this up to the forum!

@PiotrSikora

This comment has been minimized.

Copy link
Author

PiotrSikora commented Mar 23, 2018

Though, reading IETF101 meeting notes (sorry for missing it!), it seems that discussion was around using ALPN for negotiating WebSocket-over-HTTP/2 and not about :protocol values.

@MikeBishop

This comment has been minimized.

Copy link
Contributor

MikeBishop commented Mar 24, 2018

@PiotrSikora, those are the same topic. The :protocol extension to CONNECT was defined for the primary purpose of using WebSockets over an HTTP/2 stream; it just happens to be a general-purpose mechanism we can use for other things too. And I think the Upgrade registry, being an existing registry which contains protocols that HTTP can upgrade to is probably the right choice when defining a new sort of upgrade within HTTP.

However, if we were redefining the Upgrade registry now, I'd argue for using the ALPN registry for both of these. Fundamentally, they are both registries of tokens which identify an application-layer protocol which can run over a bytestream. (Or collection of bytestreams, when used with QUIC.) The only real restriction is that Upgrade requires that the protocol be able to answer the original HTTP request in the new protocol, which means there has to be a defined mapping between HTTP requests and whatever the new protocol is.

The currently-registered values are disjoint, but I wonder if perhaps HTTPter should consider merging the two registries?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.