[Haskell-cafe] Network.HTTP problem

Radosław Grzanka radoslawg at gmail.com
Sat Nov 17 17:24:22 EST 2007


Hi Graham,

2007/11/17, Graham Fawcett <graham.fawcett at gmail.com>:
> On Nov 17, 2007 4:52 PM, Radosław Grzanka <radoslawg at gmail.com> wrote:
> > > > Also:
> > > > $ ./get http://digg.com/rss/indexvideos_animation.xml
> >
> > However this one still seems to hang and eventually ends with :
> > get: recv: resource vanished (Connection reset by peer)
>
>
> It's not a Haskell problem. It looks like Digg expects a User-Agent
> request header. Modify get.hs like this:
>
> request uri = Request{ rqURI = uri,
>                        rqMethod = GET,
>                        rqHeaders = [Header HdrUserAgent "haskell-get-example"],
>                        rqBody = "" }

Yes, that works. It's not only digg but other services as well..

Thank you for your help.
  Cheers,
   Radek.

-- 
Codeside: http://codeside.org/
Przedszkole Miejskie nr 86 w Lodzi: http://www.pm86.pl/


More information about the Haskell-Cafe mailing list