[erlang-questions] Fwd: Re: http error on request using httpc:request

Éric Pailleau eric.pailleau@REDACTED
Fri Aug 7 11:42:06 CEST 2015



---------- Message transféré ----------
De : Éric Pailleau <eric.pailleau@REDACTED>
Date : 7 août 2015 11:32
Objet : Re: [erlang-questions] http error on request using httpc:request
À : Dmitry Bushmelev <dmitrii.bushmelev@REDACTED>
Cc : 

> Hello,
> Use {autoredirect, true}. 
> Regards
>
> Le 6 août 2015 09:46, Dmitry Bushmelev <dmitrii.bushmelev@REDACTED> a écrit :
> >
> > Hi.
> > If I am making request using curl or browser, response is successful:
> >
> > $ curl -v http://www.fotbolldirekt.se/epfootball/feed/
> > * Trying 188.95.225.175...
> > * Connected to www.fotbolldirekt.se (188.95.225.175) port 80 (#0)
> > > GET /epfootball/feed/ HTTP/1.1
> > > User-Agent: curl/7.37.1
> > > Host: www.fotbolldirekt.se
> > > Accept: */*
> > >
> > < HTTP/1.1 200 OK
> > …
> >
> > but if I am using httpc I am getting 500:
> >
> > > httpc:request(get, {"http://blogg.vk.se/fotbollsbloggen/feed/", []}, [], []).
> > {ok,{{"HTTP/1.0",500,"Server Error"},
> >      [{"cache-control","no-cache"},
> >       {"connection","close"},
> >       {"content-type","text/html"}],
> >      "<html><body><h1>500 Server Error</h1>\nAn internal server error occured.\n</body></html>\n”}}
> >
> > Erlang 17.4, problem reproduces on ubuntu 14.04 and OSX 10.10.
> >
> > Do someone knows how to fix that?
> > Thanks.
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@REDACTED
> > http://erlang.org/mailman/listinfo/erlang-questions


More information about the erlang-questions mailing list