Hi Daniel,

Adding in
 hPutStrLn h ("Connection: close\r\n")
or
  hPutStrLn h ("Connection: keep-alive\r\n")
as appropriate should sort that.

Works like a charm.

This is responding with a 302, the resource has been found but is temporarily
at another location indicated in the responses Location header.
So, now you'll have to start parsing responses.
In this case the Location header is www.cs.york.ac.uk/public.php

I didn't get as far as getting the 302, but it works now.

The cheap and cheerful solution might be to invoke cURL.

My standard solution was to invoke wget, but a Haskell solution would
be nicer. For my purpose following redirects etc. isn't required, so
thanks very much for your help. I will be releasing this function as
part of a library shortly, so will be giving you credit for your help!

Thanks

Neil
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to