Skip to content

Comment on Ask HN: Please help Does HTTP/3 chain requests?parent

Comments

I'm not sure where that particular request is coming from, to be sure, but HTTP/3 requests don't work like that.

https://www.rfc-editor.org/rfc/rfc9114.html#section-4.1-1 specifically https://www.rfc-editor.org/rfc/rfc9114.html#section-4.1-3

Also, I'm writing a HTTP server at the moment, so I'm pretty familiar with the protocols. (Not claiming to be an expert, but the reason I responded is that I've put A LOT of effort into understanding the protocols at a low level that last month or so, and I wanted to help if I could.)

I would go into this assuming that either there is something else on the page with that path, or an errant javascript request, or something else is mangling the message before it gets to you.

HTTP/2 and HTTP/3 both allow you to do a server push (where the server tells the client that it wants to send multiple files to it), and that might be what gunicorn is doing (I'm not familiar with it).

But, again, HTTP/3 does not chain together requests as a single path in the way that you described.

As for why it switched from 2 to 3, perhaps it was the fact that you were attempting to send multiple files that prompted the connection upgrade? Maybe it's the presence of a https connection (HTTP/3 requires TLS, but HTTP/2 does not).

"I would go into this assuming that either there is something else on the page with that path (or an errant javascript request)."

There is no JavaScript present. I'm 100% certain this behavior is intentional. I've responded to the unexpected behavior (which originally caused my application to crash under those circumstances) by yielding resource generators in the specified order which ultimately upgraded the connection to HTTP/3. I can repeat that behavior, log the same path, and get a new result. I don't know what else to say about it.

"But, again, HTTP/3 does not chain together requests as a single path in the way that you described."

I wonder if that path might be how the HTTP3 request gets translated to the WSGI app. Basically... something between the Cloudflare tunnel and my WSGI app.

"Also, I'm writing a HTTP server at the moment, so I'm pretty familiar with the protocols."

Very fun! This is my next task actually. I have the TCP/IP series arriving next week and already have Unix Network Programming on the shelf.

This is my next task actually.

Awesome! Good luck!

Mine is in C++, and is part of a larger project. I've thoroughly enjoyed the process!

So far, I've written a scripting language, a thread pool worker queue, and now I'm working on the HTTP server. I'm writing them as libraries (in the same way that libpng or libjpeg exist as libraries). I have a few more "steps" before gluing it all together into a larger project, but it's taking shape!

There's a simple pleasure in getting to the fundamentals of computing, away from the layer upon layer of abstraction that plagues development today.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.