Re: pyblosxom and thttpd (bug 1252678)
will guaraldi <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
Never mind... I figured out what the problem was and fixed the code. We shouldn't be reading stdin on GET requests. I added a check to make sure to read stdin only when the request isn't GET and that fixed the issue. I feel kind of silly--I should have thought of that initially. /will On Fri, 5 Aug 2005, will guaraldi wrote: > > A user is having problems with PyBlosxom hanging on requests when used > with thttpd. I installed thttpd and tracked the problem down to this > line: > > self._in.write(input.read()) > > in buffer_input_stream in the Request object. It looks like the read call is > hanging indefinitely reading from input (a FileObject object aka stdin). > > With network streams we typically query the stream to see if it has data > queued up before we do a blocking read. I'm not sure how to do that with > FileObjects. Theoretically, the data should be there already--so I'm not > sure why it's blocking. > > Any ideas on what we can do that's compatible with Python 2.2? > > /will ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf