[undertow-dev] Supporting HTTP CONNECT over HTTP/2?

Ivan Ristic ivan.ristic at gmail.com
Tue Apr 14 06:28:47 EDT 2020


On Tue, Apr 14, 2020 at 4:15 AM Stuart Douglas <sdouglas at redhat.com> wrote:

>
>
> On Mon, 13 Apr 2020 at 01:34, Ivan Ristic <ivan.ristic at gmail.com> wrote:
>
>> Hello list,
>>
>> Is there any interest in getting HTTP CONNECT over HTTP/2 to work? I
>> spent some time on it, but although I fixed two small issues, I hit a third
>> that was beyond my undertow knowledge. I was left feeling that getting this
>> to work only requires a few connecting pieces, although naturally I could
>> be wrong.
>>
>
> It's a cool idea, but it's unlikely we will have time to look at it in the
> short term. If you wanted to look into it we should be able to give you
> some tips.
>

Understood. This is for a project that we may undertake in the second half
of this year, so we may be able to allocate some time then.

That said, a lot of our time would have to be spent on learning undertow.
If there's someone on this list who might be interested in implementing
this feature on a commercial basis, could you please get in touch with me?
Thanks.


Stuart
>
>
>>
>> Here's what I discovered:
>>
>> - In Http2ReceiveListener, there's code that refuses requests that don't
>> have path set (with "No :path header sent in HTTP/2 request"). However,
>> path must be omitted with CONNECT per
>> https://tools.ietf.org/html/rfc7540#page-64
>>
>> - Later on, ConnectHandler doesn't expect the path to be null.
>> - The acceptConnectRequest handler from
>> https://github.com/undertow-io/undertow/blob/master/core/src/main/java/io/undertow/server/handlers/ConnectHandler.java
>> is not getting called and the connection is thus not setup. This is because
>> Http2ServerConnection#setConnectListener doesn't do anything, unlike its
>> counterpart HttpServerConnection.
>>
>> For context, I was playing with the idea of building a general-purpose
>> forward TCP proxy based on undertow. HTTP/2 is of interest here because of
>> multiplexing, which would eliminate connection setup costs [of both TCP and
>> TLS] between the client and proxy and substantially improve performance
>> when many connections are needed.
>>
>> If it matters, I used Jetty's HTTP/2 client library to connect to
>> Undertow, although I had to patch it to not send path and scheme when
>> method is CONNECT.
>>
>> --
>> Ivan
>> _______________________________________________
>> undertow-dev mailing list
>> undertow-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/undertow-dev
>
>

-- 
Ivan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20200414/57785699/attachment.html 


More information about the undertow-dev mailing list