
16 Jun
2008
16 Jun
'08
9:11 a.m.
On Jun 16, 2008, at 2:58 PM, Jules Bean wrote:
Sebastiaan Visser wrote:
Does anyone know a pattern in which I can do this easily?
Don't use hGetContents on a socket. That's asking for trouble.
Can you please explain why? What is a more easier method to spool your HTTP post data to a file than: Bs.hGetContens sock >>= Bs.hPut fd ?
Use hGetContents either NEVER (easy option) or only on throwaway handles/files which won't be used again.
My sockets will be thrown away eventually. Isn't anything? I can imagine that this can be a problem when using Keep-Alive connections - or alike - but that is a whole different story.
Jules
Thanks, Sebas.