Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wsgi: minimize API changes for 100-continue fix (#569)
In commit b9bf369, we stopped sending 100 Continue responses in the middle of a response when the application was over-eager to start sending back bytes, but I did that by pulling the headers_sent state out of handle_one_response(), up into handle_one_request(), and plumbing it through to * get_environ(), * Input.__init__(), and finally * handle_one_response(). This works, but updates a whole bunch of HttpProtocol APIs in ways that consumers may not have been expecting. For example, if someone wanted to subclass HttpProtocol and override get_environ(), they may not have bothered to include *args and **kwargs to accommodate future API changes. That code should certainly be fixed, but we shouldn't break them gratuitously. Now, wait to introduce the headers_sent state until handle_one_response() once more, and push it directly into the request's Input. All the same protections with minimal API disruption.
- Loading branch information