How about rolling the gist examples up into the HTTPServer class and
removing the "Test" prefix so they're automatically shipped with it?
-j
--
The Christian ideal has not been tried and found wanting;
it has been found difficult and left untried – G. K. Chesterton
Hi,It has been more than 2 years by now... Has this been implemented in Tornado 3?
Maybe I should take a second look at this. :) I've wanted to make it path / handler class based, but as far as I can tell there is still no method to do that since this is determined before path processing. Anything I'm missing?
--
You received this message because you are subscribed to the Google Groups "Tornado Web Server" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-tornad...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Ben,Callbacks when headers are read would be great!To expand on this, it would be amazing to have hooks into each of the HTTP request "phases":- Pre and post request URL (GET /abc.html HTTP/1.1).- Pre and post all headers are read.- When each header is read.- Pre and post body is read.- Before server closes the connection.
Most of these can be grouped into one - since all the headers arrive at nearly the same time there's not much point in splitting them up into separate callbacks. I'm thinking something like this:* When the (TCP) connection is established (so you can reject a connection solely based on the IP address before doing any real work)* For HTTPS, after the SSL handshake (so you can see the client's certificate). There might be more SSL-related callbacks for SNI or NPN/ALPN if there is a need to expose those events to the application.* After all the headers have been read* As each chunk of the body is read (for applications that opt into streaming request processing).* After the body has been completely read* After the handler has finished generating its response* After the last byte of the response has been sent to the client* When the connection has reached an idle timeout and is closed, or has been closed by the client
Peace,R.
Thx + Peace,
R
2014-03-01 17:10 GMT+01:00 Ben Darnell <b...@bendarnell.com>:
> This looks reasonable as a quick fix; in the long run we'll have anIf you have some ideas on how to implement that I could make some stubs.
> officially-supported cleaner interface for this kind of callback.
We could collect this post discussion in a set of use-cases
(eventually example http request and responses) to clean the vision of
our requirements.
I don't cover http streaming so it would really help me to understand
the streaming part of the issue.
This change could impact on the @authenticated stuff, as header
authentication should happen as soon as possible.
Thx++ for your time & Peace,
R.