-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
add Expect: 100-continue handling for #267 #268
Conversation
Conflicts: aiohttp/protocol.py
Could you please rebase your branch to exclude merge commits and squash |
i agree "continue" should be default behavior, but there are several issues:
|
@kxepal I'd rather create a new pull request.
I just don't see how developer may want to change "100-continue" behavior and have unsolvable problems with it at same time. All in all, this PR:
It might be better to place all these into a separate base middleware, somethink like this: class ExpectContinueMiddlewareBase(object):
def factory(cls):
pass
def check_expectation(self, request):
""" if expectation is not met, returns final Response for it.
Returns none if all is ok. """
raise NotImplementedError() |
I don't like this implementation, it is too specific. What if we add Request.continue() or it could be route object responsibility. |
Making route responsible for continue is cleanest solution, but I don't like it right now. @asvetlov thoughts? |
close #287 |
request.post()
, it actually agrees with "100-continue" expectation, so server must send "HTTP/1.1 100 Continue"Response
without reading whole request body (it may read, but don't need this)So,
request.post()
is a place where 100-Continue answer could be safely sent to HTTP/1.1 clients.see #267 for more defails