summaryrefslogtreecommitdiff
path: root/paste/httpserver.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix error on httpserver shutdownJames E. Blair2017-06-061-1/+5
| | | | | | | | | If a worker thread takes longer than 0.5s to shut down, we try to kill it. However, if it manages to stop between the 0.5s timeout and the call to kill_worker, kill_worker will raise an exception and abort shutdown. Handle that case with an exception handler.
* Don't display invalid error message when socket in useMarc Abramowitz2015-05-111-2/+4
| | | | | | | | | | | | | Previously, when the listening socket was already in use, this error message was displayed: ... File "/private/tmp/n/lib/python2.7/site-packages/Paste-1.7.5.1-py2.7.egg/paste/httpserver.py", line 1106, in server_close self.thread_pool.shutdown(60) AttributeError: 'WSGIThreadPoolServer' object has no attribute 'thread_pool' We prevent this by checking if `self` has a `thread_pool` attribute before trying to reference it. Fixes issue #5 (https://bitbucket.org/ianb/paste/issue/5/invalid-error-message-when-the-socket-is)
* Make utility function private: _get_headersBB-4Marc Abramowitz2015-04-301-4/+9
|
* Make get_headers default to Python 3; fallback to Python 2Marc Abramowitz2015-04-301-4/+4
| | | | as suggested by @haypo at https://bitbucket.org/ianb/paste/pull-request/22/fix-improper-commas-in-request-headers-in/diff#comment-6583636
* Make get all values of a header work on both Python 2 and 3Marc Abramowitz2015-04-281-1/+9
|
* Fix improper commas in request headers in wsgi_environMarc Abramowitz2015-04-271-1/+1
| | | | | | Revert from using `get` to `getheaders` method. fixes #4
* Merged in mfrobben/paste (pull request #21)Victor Stinner2015-04-221-2/+1
|\ | | | | | | Fix bad reference to iterator variable
| * Fix pyflakes warningsVictor Stinner2015-04-221-2/+1
| | | | | | | | | | | | * Remove unused variables * Remove unused imports * Remove dead code
* | Fix bad reference to iterator variableMatthew Robben2015-01-161-1/+1
|/
* Python 3: fix paste.httpserverVictor Stinner2014-03-191-25/+27
|
* Python 3: Use six types for stringsCyril Roelandt2014-03-181-1/+1
| | | | | * Replace (str, unicode) with (six.binary_type, six.text_type) * Replace basestring with (six.binary_type, six.text_type)
* Python 3: use six.reraise() to re-raise an exception with the tracebackCyril Roelandt2014-03-181-1/+2
|
* Python 3: use new names of standard library modulesCyril Roelandt2014-03-181-2/+3
| | | | Use "try/except ImportError" to try Python 2 and Python 3 names.
* Import StringIO so it can be used.stringiomatt2013-01-281-0/+1
|
* Fixed parsing of URL paths starting with multiple slashes.double_slash_at_start_of_path_fixRichard Mitchell2012-08-021-1/+2
|
* Always wrap wsgi.input with LimitedLengthFile, even when using the ↵Ian Bicking2011-08-171-9/+8
| | | | ContinueHook. Also always use ContinueHook when there is Expect: 100-Continue, even if the server is supposed to be HTTP/1.0 (because the client wouldn't know the server version when it sends the request; curl notable stalls waiting for a continue)
* Allow server_address tuples that are longer (specifically for IPv6 support: ↵Ian Bicking2010-09-021-5/+4
| | | | http://trac.pythonpaste.org/pythonpaste/ticket/275)
* do a proper read with 100 Continueianb2009-09-021-1/+1
|
* Fix paste.httpserver on py2.6 (#314)ianb2008-11-151-0/+6
|
* Re-raise KeyboardInterruptianb2008-09-081-0/+3
|
* make seek method conditionalianb2008-08-111-1/+3
|
* Adding request_queue_size option to increase socket queue for Paste#http server.bbangert2008-06-201-11/+26
|
* Fix ticket #249maluke2008-04-131-7/+7
|
* allow binding to port 0pjenvey2008-03-071-1/+1
|
* Typoianb2008-02-191-1/+1
|
* Do not ignore wsgi.input readline size argument (which can lead to lots of ↵ianb2008-02-121-1/+4
| | | | memory used)
* Use threadsafe connection class, to avoid some https errors (#211)ianb2007-12-171-2/+9
|
* don't lower-case headers going out, send them as-iscce2007-11-081-3/+3
|
* minor tweak (appears to be backward compatible) to permit use with SSL chainscce2007-09-191-1/+1
|
* reverting FreeBSD threadpool disablingianb2007-09-041-5/+1
|
* fix more possible thread errors, followup to r6843pjenvey2007-08-131-5/+8
|
* Fix possible thread error, when a thread finishes while add_task is looking ↵ianb2007-08-131-2/+2
| | | | at it
* being pedantic, trying to find source of memory leakcce2007-08-091-0/+1
|
* The threadpool code just doesn't work on FreeBSD.cce2007-08-041-1/+7
|
* Don't read past the end of the line with LimitedLengthFile.readline (from ↵ianb2007-06-281-3/+1
| | | | Michael van Tellingen)
* docstring misformatting; added news linkianb2007-06-261-1/+1
|
* Cleaned up the worker lifecycle logic, fixing some bugs in how workers are ↵ianb2007-04-271-34/+48
| | | | tracked. Track why worker threads are started, and include this information in the logs.
* Fix the way max_requests works, so that we don't think the idle worker ↵ianb2007-04-261-1/+7
| | | | thread is still around (which caused the *real* worker threads to be culled, leaving only ghost workers who don't actually do any work, and thus the server would freeze)
* Add a better logging message about the thread worker pollingianb2007-04-261-0/+23
|
* Don't register the cleanup until the rest of the threadpool constructor has ↵ianb2007-04-261-3/+2
| | | | successfully run
* Add information about proxy requestsianb2007-04-151-1/+5
|
* Added a parameter to the threadpool: max_requests, which is the maximum ↵ianb2007-04-121-12/+25
| | | | number of requests to process in a worker thread before killing that thread. This should resolve problems with long-lived threads, as no thread lives too terribly long with this on. Also, turn the threadpool back on by default. And turn LimitedLengthFile back on when it is not an SSL connection
* - commeting out LimitedLengthFilecce2007-03-291-2/+10
| | | | | | | - making threadpool not be the default Once issues with these can be fixed, we could restore LimitedLengthFile and perhaps make threadpool the default
* Fixed logic error where we'd spawn extra workers, then immediately cull ↵ianb2007-03-291-1/+7
| | | | them. Now we wait a little while after spawning workers to cull them
* adding comment about address_string()cce2007-03-271-0/+3
|
* I think one meant min, not max here; if the read function askedcce2007-03-211-1/+2
| | | | | | for 16 bytes, and 64 are available, you should only return 16, not 64. This is important due to MIME types (where sub-chunks are read in via content-length on each sub-item).
* Give a better error when start_response isn't called; give a Content-Length ↵ianb2007-03-201-2/+8
| | | | so that the connection is closed properly on error
* fix some typos, from pythyianb2007-03-171-3/+3
|
* Changed default for kill_thread_limit; reformatianb2007-03-121-10/+11
|
* Don't start workers until everything is initializedianb2007-03-111-2/+2
|