Jens Petersen <[EMAIL PROTECTED]> writes: > "Dominic Cooney" <[EMAIL PROTECTED]> writes: > > > > sendTo host port "GET / HTTP/1.0\r\n\r\n"; > > Hmmm, I was trying something more like (under Linux): > > do > h <- connectTo host port > hPutStrLn h "GET / HTTP/1.0\n" > response <- hGetContents h > putStr response > > Unfortunately this hangs waiting for the response. > Don't know why yet...
As Ketil Malde pointed out to me, Dominic's crlfcrlf sequence is indeed necessary. Ie after replacing the above hPutStrLn line with hPutStr h "GET / HTTP/1.0\r\n\r\n" my program finally works. As Simon comments in his webserver, some kinding of transfer coding would be nice to avoid this kind of hassle. <blush/> Jens _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell