[Haskell-cafe] hSetBuffering woes
Bryan O'Sullivan
bos at serpentine.com
Sun Jun 17 13:51:58 EDT 2007
Eric wrote:
> I'm writing a simple HTTP server and am trying to implement the POST
> method.
That's a rather general problem statement, indeed :-) For an
application like this, I'd suggest that explicit resource management is
the way to go, and that you should not be using hGetContents at all,
under any guise. For example, any scheme involving reading an entire
stream is going to do completely the wrong thing in the face of HTTP
keepalive. Also, code that leaves open sockets piling up in drifts, to
eventually be shoveled up by the RTS, is going to be trivially easy to DoS.
<b
More information about the Haskell-Cafe
mailing list