<br><div class="gmail_quote">On Mon, Jan 23, 2012 at 10:43 PM, Michael Snoyman <span dir="ltr"><<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Tue, Jan 24, 2012 at 8:37 AM, Myles C. Maxfield<br>
<<a href="mailto:myles.maxfield@gmail.com">myles.maxfield@gmail.com</a>> wrote:<br>
> I have attached a patch to add a redirect chain to the Response datatype.<br>
> Comments on this patch are very welcome.<br>
<br>
</div>I thought that this isn't necessary since a client wanting to track<br>
all the redirects could just handle them manually by setting the<br>
redirect count to 0.<br></blockquote><div>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.</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
> I was originally going to include the entire Request object in the<br>
> redirection chain, but Request objects are parameterized with a type 'm', so<br>
> including a 'Request m' field would force the Response type to be<br>
> parameterized as well. I felt that would be too large a change, so I made<br>
> the type of the redirection chain W.Ascii.<br>
><br>
> Perhaps its worth using the 'forall' keyword to get rid of the pesky 'm'<br>
> type parameter for Requests?<br>
><br>
> data RequestBody<br>
> = RequestBodyLBS L.ByteString<br>
> | RequestBodyBS S.ByteString<br>
> | RequestBodyBuilder Int64 Blaze.Builder<br>
> | forall m. RequestBodySource Int64 (C.Source m Blaze.Builder)<br>
> | forall m. RequestBodySourceChunked (C.Source m Blaze.Builder)<br>
<br>
</div>There'd be no way to run the request body then (try compiling the code<br>
after that change).<br></blockquote><div>Yeah, I never actually tried this change to see if it works. I'll try it tonight after work. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
Michael<br></font></span></blockquote><div><br></div><div>Thanks,</div><div>Myles </div></div><br>