-
Notifications
You must be signed in to change notification settings - Fork 62
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
Joining efforts with the CherryPy team #84
Comments
Unsurprisingly, I think this would be great :-). I don't currently know of any changes needed on h11's side; it's already designed to be dropped into a server like CherryPy. There may be some real-world compatibility issues that you flush out, because HTTP/1.1 has many poorly-specified edge cases, but the only unresolved one I know about currently is #31 (h11 doesn't preserve header case) and that's mostly an issue for clients, not servers. Let us know how it goes! |
Hey there, I'm one of the developers working on this task and I'm confused about the terminology of this page. According to the page, "h11 only speaks HTTP/1.1", but in that same page, "It can talk to HTTP/1.0 clients and servers". I'm at a point where our HTTP/1.1 parser is working correctly in tests, but it's failing when the tests initially start with HTTP/1.0 with an error stating that h11 only speaks HTTP/1.1. Is there a workaround to allow h11 to talk to an HTTP/1.0 client that I'm missing? |
HTTP/1.1 is supposed to be backwards compatible with HTTP/1.0, so any correct implementation of HTTP/1.1 should work fine when the other side is speaking HTTP/1.0. Of course, HTTP in the real world doesn't always work the way the standards say it should, so it's possible that we have some bugs here. But I'm not aware of any bugs like that currently. A server using h11 should Just Work when a client speaks HTTP/1.0. Are you trying to explicitly detect what version the client is using and speak the same version back to it? You don't need to do that. |
Looks like the relevant PR is cherrypy/cheroot#262, and the solution is indeed to just speak HTTP/1.1 even if the peer only speaks HTTP/1.0. |
@njsmith thanks for merging that! Could you please also cut a release so that we could depend on it as published on PyPI? |
Hey @njsmith, could you please unblock us by releasing the recent changes to PyPI? |
@webknjaz I've released 0.10.0, which should unblock you. Lets find out how h11 works with CherryPy! |
@pgjones thanks a lot! |
Hi,
I'm one of the maintainers of CherryPy. Currently, we have a subproject which implements HTTP/WSGI server as a separate Python package distribution. It's called Cheroot.
It implements own HTTP parsing layer.
Given that having a one good framework-agnostic protocol implementation is one honking great idea, it seems logical to use that instead of supporting own parser.
I'm looking forward to seeing how we could integrate h11 and also porting things from Cheroot/CherryPy into h11 in order to have one superior HTTP parser.
Ref: cherrypy/cheroot#201.
I haven't checked h11 deeply so I'm publishing this just to document the intention :)
The text was updated successfully, but these errors were encountered: