[Haskell-cafe] Contributing to http-conduit

Myles C. Maxfield myles.maxfield at gmail.com
Tue Jan 24 20:05:37 CET 2012


Sorry, I don't think I'm following. What would the meaning of the value
returned from checkRedirect be?

--Myles

On Tue, Jan 24, 2012 at 10:47 AM, Michael Snoyman <michael at snoyman.com>wrote:

> On Tue, Jan 24, 2012 at 6:57 PM, Myles C. Maxfield
> <myles.maxfield at gmail.com> wrote:
> >
> > On Mon, Jan 23, 2012 at 10:43 PM, Michael Snoyman <michael at snoyman.com>
> > wrote:
> >>
> >> On Tue, Jan 24, 2012 at 8:37 AM, Myles C. Maxfield
> >> <myles.maxfield at gmail.com> wrote:
> >> > I have attached a patch to add a redirect chain to the Response
> >> > datatype.
> >> > Comments on this patch are very welcome.
> >>
> >> I thought that this isn't necessary since a client wanting to track
> >> all the redirects could just handle them manually by setting the
> >> redirect count to 0.
> >
> > It seems like a lot of work to re-implement the redirection-following
> code,
> > just to know which URL the bytes are coming from.  I feel that adding
> this
> > field makes the library easier to use, but it's your call.
>
> If that's the concern, I'd much rather just expose a function to help
> with dealing with redirects, rather than sticking a rather arbitrary
> [Ascii] in everyone's Response. I think a function along the lines of:
>
> checkRedirect :: Response -> Maybe Request
>
> would fit the bill, and could be extracted from the current `http`
> function.
>
> Michael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120124/62568e14/attachment.htm>


More information about the Haskell-Cafe mailing list