Ben Darnell
8e274f08e7
Speed up _convert_header_value
2011-08-06 13:23:35 -07:00
Ben Darnell
bbb2d38cfa
Add RequestHandler.add_header to allow headers to occur multiple times.
2011-08-06 13:06:54 -07:00
Ben Darnell
ef907902c8
Better path surgery in autoreload
2011-08-06 12:23:12 -07:00
Ben Darnell
ef95c11fb0
Fix style, add comments
2011-08-02 23:58:41 -07:00
Ben Darnell
256c004d14
Merge remote-tracking branch 'alekstorm/master' into merge
2011-08-02 23:54:28 -07:00
Ben Darnell
7aec8fc9b3
If a PeriodicCallback runs longer than its period, skip the missed callbacks
...
instead of trying to run all the missed callbacks to catch up.
2011-08-02 23:47:55 -07:00
Ben Darnell
01be222ec8
Merge remote-tracking branch 'jfisteus/periodic_callback' into merge
2011-08-02 23:44:21 -07:00
Ben Darnell
6ec7b47cf8
Add install() method to IOLoop to allow a custom subclass as the singleton.
...
Singleton-related methods are now static, not class methods.
2011-08-02 23:33:39 -07:00
Ben Darnell
677c987ad9
Test that tornado.database is at least importable on all supported pythons.
...
Fix a problem preventing import on pypy (but apparently there are still other
issues with running MySQLdb on pypy, so the module will not actually work yet).
2011-08-02 23:26:50 -07:00
Alek Storm
a286935b2a
Add extra '_modules' reference to modules list in template parameters, which is used by {% module ... %} directive to avoid naming conflicts with Python modules named 'modules'
2011-07-29 21:02:57 +00:00
Jesus Arias Fisteus
c4c596044f
Stabilization of the period of ioloop.PeriodicCallback.
...
Previously, the timeout for the following event was computed by adding
callback_time to the actual time the callback finished, which caused
calls to the callback not being trully periodic.
This commit makes callback_time be a stable period by scheduling the
next timeout callback_time after the previous timeout was scheduled.
2011-07-28 19:17:00 +02:00
Ben Darnell
8c3e46c491
Add option to print out generated template code in benchmark
2011-07-27 22:09:49 -07:00
Ben Darnell
fa5b0f26f1
Speed up xhtml_escape (template benchmark goes from 49ms to 32ms)
2011-07-27 22:03:50 -07:00
Ben Darnell
3a7e30896b
Add a template benchmark, based on one in jinja2
2011-07-27 22:01:05 -07:00
Ben Darnell
71abb9fd02
More defensiveness about patterns that could lead to double callbacks.
2011-07-27 21:04:22 -07:00
Ben Darnell
a0ff0ed9e2
Allow unicode string literals to appear in template expressions.
...
Closes #313 .
2011-07-26 10:50:32 -07:00
Ben Darnell
6fcc459e43
Support Content-Length headers that have been duplicated by a proxy.
...
Closes #249 .
2011-07-24 19:59:14 -07:00
Ben Darnell
5c6a91ddc7
Merge branch 'httpclient_buffer'
2011-07-24 19:24:23 -07:00
Ben Darnell
f2142ee27c
Fix test that depended on simple_httpclient implementation detail.
2011-07-24 19:23:38 -07:00
David Recordon
aa777a0785
Allow setting the maximum read buffer size when constructing a SimpleAsyncHTTPClient. Defaults to 100mb like the underlying IOStream. Tested that fetching a file over 100mb no longer gives a "Maximum read buffer size" exception.
2011-07-20 21:23:01 -07:00
Ben Darnell
080dab2d7d
Consistently guard against uncaught exceptions leading to multiple callback
...
invocations in SimpleAsyncHTTPClient.
2011-07-19 19:35:22 -07:00
David Recordon
b4324c1ec7
Noticed that a max_clients around 50 would cause us to run out of file descriptors. lsof showed that TCP connections would remain in the established state versus being closed. stream.close is called in error states but not success. Thus call stream.close after passing the response to the callback. Result was seeing the TCP connections being properly closed as well as no change in fetching data.
2011-07-19 19:12:28 -07:00
Ben Darnell
e360c72a16
Delay IOStream close callback until all pending callbacks have been processed.
...
This fixes an issue with SimpleAsyncHTTPClient when the server closes the
connection and the close is processed before all of the data is read.
Closes #306 .
2011-07-18 23:52:27 -07:00
Ben Darnell
6f9e2f61fa
Move httpclient_tests that never worked with curl to simple_httpclient_test.
...
curl_httpclient_test was previously creating SimpleAsyncHTTPClients due to a
bug, so these failing tests went unnoticed.
2011-07-18 22:59:01 -07:00
Ben Darnell
5d895f0472
Fix HTTP client selection as used in curl_httpclient_test.
...
AsyncHTTPClient.configure() was working, but it didn't work to instantiate
the client directly like the unit tests were using.
2011-07-18 22:34:19 -07:00
Ben Darnell
0d31f1c636
Make "python -m tornado.autoreload" run with a consistent sys.path.
2011-07-18 21:25:59 -07:00
Ben Darnell
f376841b2c
Add a config file to run tornado tests under multiple python versions with tox.
...
Also fix a setup.py problem that was leaving files out of the sdist output.
2011-07-17 16:52:56 -07:00
Ben Darnell
e13594da68
Merge branch 'master' into twisted
2011-07-17 15:18:49 -07:00
Ben Darnell
379cd3d609
Change binary literals to hex for compatibility with python2.5
2011-07-17 15:17:36 -07:00
Ben Darnell
ef42bd8a5a
Fix WebSocketProtocol8 on python3
2011-07-17 15:13:04 -07:00
Ben Darnell
c91df19763
Make websocket demo work on firefox 6 beta
2011-07-17 15:01:07 -07:00
Ben Darnell
5abfc795ae
Merge remote-tracking branch 'flodiebold/master' into merge-websocket
2011-07-17 15:00:52 -07:00
Ben Darnell
27951ad13c
Rename twistedreactor -> twisted
2011-07-17 14:07:19 -07:00
Ben Darnell
1264faa33d
Run parts of twisted's test suite on the tornado reactor
2011-07-17 14:03:42 -07:00
Florian Diebold
9d41c834f6
Handle the hybi-07 version of the WebSocket protocol with the 08 implementation.
...
There don't seem to be any differences on the server side.
2011-07-17 22:15:21 +02:00
Ben Darnell
b19a6d318e
Make twisted tests run under python 2.5
2011-07-17 12:46:22 -07:00
Florian Diebold
b202daa6e6
Send the data of the ping frame back in the pong, as specified.
2011-07-17 21:25:05 +02:00
Florian Diebold
dc74565a05
Fix an exception when connecting with an unsupported WebSocket version.
2011-07-17 21:16:30 +02:00
Ben Darnell
7a70185afb
Remove new backwards-incompatible arguments from StaticFileHandler.set_extra_headers
2011-07-17 10:46:01 -07:00
Ben Darnell
110de61b58
Merge commit '8dbe9ba' into work
2011-07-17 10:45:54 -07:00
Ovidiu Predescu
a026a784d0
Removed run() method.
2011-07-14 19:00:44 -07:00
Ovidiu Predescu
051a6cac0e
New test to check that addWriter followed by removeWriter properly removes the writer from IOLoop.
2011-07-14 16:24:42 -07:00
Ovidiu Predescu
5eaa84b7e3
Moved twisted/reactor.py to platform/twistedreactor.py.
...
twistedreactor.py:
- cleaned up logging
- don't try to crash if stop has been called (uses _running to check it)
- don't add reader and writers if they've already been added
- use a NullContext when calling add_handler
- call IOLoop.close() to properly close file descriptors
- implement run() and instruct the reactor to not install signal handlers.
import_test.py:
- import twistedreactor too
twistedreactor_test.py:
- do conditional includes based on twisted
- remove superfluous logging
- don't use assertGreater
- use threading instead of the thread module. Join threads at the end of test.
- properly close the file descriptor in Reader/Writer's connectionLost().
- make use of tornado.platform.auto's set_close_exec.
- write only one in the pipe, and check for that.
2011-07-14 16:00:02 -07:00
Ovidiu Predescu
99b3a9a764
Fix misspelling.
2011-07-14 15:52:35 -07:00
Ben Darnell
f0438e5d9f
Add a callback for flow control to RequestHandler.flush
2011-07-13 20:09:02 -07:00
Florian Diebold
d227f3bade
Implement the hybi-10 version of the WebSocket protocol.
2011-07-13 21:26:54 +02:00
Florian Diebold
48e60770c5
Refactor WebSocket support to prepare for multiple protocol versions.
...
All protocol-specific functions are moved to the former
WebSocketRequest class, which is renamed to WebSocketProtocol76. The
WebSocketHandler chooses the right WebSocketProtocol implementation by
looking at the request headers.
2011-07-13 21:26:54 +02:00
Krzysztof Tarnowski
8dbe9ba97e
Enabled subclasses to specify expiration time.
2011-07-13 19:56:24 +02:00
Ovidiu Predescu
3bb589fbd0
Don't use defaults in reactor.py as they cause unneeded initializations.
...
Fix the unittest to not initialize IOLoop's global instance.
2011-07-12 13:32:59 -07:00
Ovidiu Predescu
ec838edccb
Added the twistedreactor_test to runtests.py.
2011-07-12 12:08:50 -07:00