<div>I&#39;m a little confused as to what you mean by &#39;cookie handling&#39;. Do you mean cookies being set inside redirects for future requests inside the same redirect chain, or users being able to supply cookies to the first HTTP request and pull them out of the last HTTP response?</div>

<div><br></div><div>Clearly, making the original request specify 0 cookies is (will be) trivial. It is up to the caller to determine if he/she wants to pull cookies out of the last server response.</div><div><br></div><div>

As for cookies getting set inside a redirect chain - I believe that the Internet is &#39;broken&#39; without this. I believe a client which does not set cookies inside a redirect chain is a misbehaving client.</div><div>
<br>
</div><div>Are you suggesting that we have a &#39;do not obey cookies inside a redirection chain, instead always blindly send this arbitrary (possibly empty) set of cookies&#39; setting? That&#39;s fine with me, but we should at least but a big disclaimer around that option saying that its use leads to technically misbehaving client behavior.</div>

<div><br></div><div>Comments?</div><div><br></div><div>--Myles<br><br><div class="gmail_quote">On Sun, Jan 22, 2012 at 11:16 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">The only times cookies would be used would be:<br>
<br>
1. If you explicitly use it.<br>
2. If you have redirects turned on, and a page that redirects you also<br>
sets a cookie.<br>
<br>
I would think that we would want (2) to be on regardless of user<br>
setting, do you disagree?<br>
<span class="HOEnZb"><font color="#888888"><br>
Michael<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Mon, Jan 23, 2012 at 8:46 AM, Aristid Breitkreuz<br>
&lt;<a href="mailto:aristidb@googlemail.com">aristidb@googlemail.com</a>&gt; wrote:<br>
&gt; Just make sure Cookie handling can be disabled completely.<br>
&gt;<br>
&gt; Aristid<br>
&gt;<br>
&gt; Am 23.01.2012 07:44 schrieb &quot;Michael Snoyman&quot; &lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt;:<br>
&gt;&gt;<br>
&gt;&gt; On Mon, Jan 23, 2012 at 8:31 AM, Myles C. Maxfield<br>
&gt;&gt; &lt;<a href="mailto:myles.maxfield@gmail.com">myles.maxfield@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; 1. Oops - I overlooked the fact that the redirectCount attribute of a<br>
&gt;&gt; &gt; Request is exported (it isn&#39;t listed on the documentation probably<br>
&gt;&gt; &gt; because<br>
&gt;&gt; &gt; the constructor itself isn&#39;t exported. This seems like a flaw in<br>
&gt;&gt; &gt; Haddock...). Silly me. No need to export httpRaw.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; 2. I think that stuffing many arguments into the &#39;http&#39; function is<br>
&gt;&gt; &gt; ugly.<br>
&gt;&gt; &gt; However, I&#39;m not sure that the number of arguments to &#39;http&#39; could ever<br>
&gt;&gt; &gt; reach an unreasonably large amount. Perhaps I have bad foresight, but I<br>
&gt;&gt; &gt; personally feel that adding cookies to the http request will be the last<br>
&gt;&gt; &gt; thing that we will need to add. Putting a bound on this growth of<br>
&gt;&gt; &gt; arguments<br>
&gt;&gt;<br>
&gt;&gt; I completely disagree here. If we&#39;d followed this approach, rawBody,<br>
&gt;&gt; decompress, redirectCount, and checkStatus all would have been<br>
&gt;&gt; arguments. There&#39;s a reason we use a settings data type[1] here.<br>
&gt;&gt;<br>
&gt;&gt; [1] <a href="http://www.yesodweb.com/blog/2011/10/settings-types" target="_blank">http://www.yesodweb.com/blog/2011/10/settings-types</a><br>
&gt;&gt;<br>
&gt;&gt; &gt; makes me more willing to think about this option. On the other hand,<br>
&gt;&gt; &gt; using a<br>
&gt;&gt; &gt; BrowserAction to modify internal state is very elegant. Which approach<br>
&gt;&gt; &gt; do<br>
&gt;&gt; &gt; you think is best? I think I&#39;m leaning toward the upper-level Browser<br>
&gt;&gt; &gt; module<br>
&gt;&gt; &gt; idea.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; If there was to be a higher-level HTTP library, I would argue that the<br>
&gt;&gt; &gt; redirection code should be moved into it, and the only high-level<br>
&gt;&gt; &gt; function<br>
&gt;&gt; &gt; that the Network.HTTP.Conduit module would export is &#39;http&#39; (or<br>
&gt;&gt; &gt; httpRaw).<br>
&gt;&gt; &gt; What do you think about this?<br>
&gt;&gt;<br>
&gt;&gt; I actually don&#39;t want to move the redirection code out from where it<br>
&gt;&gt; is right now. I think that redirection *is* a basic part of HTTP. I&#39;d<br>
&gt;&gt; be more in favor of just bundling cookies in with the current API,<br>
&gt;&gt; possibly with the IORef approach I&#39;d mentioned (unless someone wants<br>
&gt;&gt; to give a different idea). Having a single API that provides both<br>
&gt;&gt; high-level and low-level approaches seems like a win to me.<br>
&gt;&gt;<br>
&gt;&gt; Michael<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Haskell-Cafe mailing list<br>
&gt;&gt; <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
&gt;&gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div>