-
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
Status Code strings #22
Comments
Nevermind, I see the |
It does follow the http spec -- "reason phrases" are arbitrary, meaningless
strings separated from the status code by a space character. We just happen
to use the empty string by default. (So the status line you pasted has a
space character between the 200 and the newline -- this is crucial. Without
it we would indeed be violating the spec.)
Like you discovered, it is possible to set the reason explicitly. Also, I'd
accept a patch that set the default reason based on the status using the
table in Python's built-in http package.
While we're here, I'd love to hear about what you're working on that
involves h11 -- especially if there are things that annoy you :-). The
server side API definitely would benefit from more real world revisited.
And I'd recommend subscribing to issue #17.
|
I like this idea. I will work on this. I am building an microservice async framework that works with asycio/curio.
I mostly finished the http portion, so if there was anything, I dont remember now 😄 but ill let you know if I find anything. Thanks. |
Neat! Is it open source? You'll still want to subscribe to #17 if you haven't -- there will probably be a few hopefully-small-but-still breaking changes in h11 ahead. (In particular I think we need to do something better about handling request targets.) |
https://github.com/wickedasp/wasp Curio support will probably happen later once curio is out of alpha. |
Currently the status code header on the response object from the server only includes the status code number and not the string. This does not follow the HTTP spec.
Returns:
Should return
Is there currently anyway to add the
OK
string on the response?The text was updated successfully, but these errors were encountered: