[Haskell-cafe] Bug in HTTP (bad internal error handling)

Ganesh Sittampalam ganesh at earth.li
Sun Oct 24 15:43:14 EDT 2010


On Sun, 24 Oct 2010, Bit Connor wrote:

> On Sat, Oct 23, 2010 at 8:49 PM, Ganesh Sittampalam <ganesh at earth.li> wrote:
>>
>> I'm just looking at fixing this so I can make an upload as discussed with
>> Sigbjorn. I guess the best thing to do is to make all the calls to fail into
>> something more explicit.
>
> Yep. Ideally, simpleHTTP and its friends should never throw an IO
> exception (and should certainly never call prelude's "error", as
> happens now). Network errors and other errors should be reported by
> returning an appropriate ConnError Result:

I'm not going to try to audit for that exhaustively right now, but I've 
changed all the calls to fail that were broken by the Either change, so 
hopefully we should be back where we started.

I've put a repo up with the changes and a base dependency bump at 
http://urchin.earth.li/git/HTTP - could you (and anyone else interested) 
give it a try? I haven't done anything but the most minimal testing and in 
particular I haven't made any effort to reproduce your specific problem.

I plan to upload this as HTTP-4000.0.10 in the next few days.

Cheers,

Ganesh


More information about the Haskell-Cafe mailing list