<br><div class="gmail_quote">On Mon, Jan 23, 2012 at 10:43 PM, Michael Snoyman <span dir="ltr">&lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt;</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>
&lt;<a href="mailto:myles.maxfield@gmail.com">myles.maxfield@gmail.com</a>&gt; wrote:<br>
&gt; I have attached a patch to add a redirect chain to the Response datatype.<br>
&gt; Comments on this patch are very welcome.<br>
<br>
</div>I thought that this isn&#39;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&#39;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>
&gt; I was originally going to include the entire Request object in the<br>
&gt; redirection chain, but Request objects are parameterized with a type &#39;m&#39;, so<br>
&gt; including a &#39;Request m&#39; field would force the Response type to be<br>
&gt; parameterized as well. I felt that would be too large a change, so I made<br>
&gt; the type of the redirection chain W.Ascii.<br>
&gt;<br>
&gt; Perhaps its worth using the &#39;forall&#39; keyword to get rid of the pesky &#39;m&#39;<br>
&gt; type parameter for Requests?<br>
&gt;<br>
&gt; data RequestBody<br>
&gt;     = RequestBodyLBS L.ByteString<br>
&gt;     | RequestBodyBS S.ByteString<br>
&gt;     | RequestBodyBuilder Int64 Blaze.Builder<br>
&gt;     | forall m. RequestBodySource Int64 (C.Source m Blaze.Builder)<br>
&gt;     | forall m. RequestBodySourceChunked (C.Source m Blaze.Builder)<br>
<br>
</div>There&#39;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&#39;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>