<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Double POST and POE</title>
	<atom:link href="http://www.subbu.org/blog/2008/10/double-post-and-poe/feed" rel="self" type="application/rss+xml" />
	<link>http://www.subbu.org/blog/2008/10/double-post-and-poe</link>
	<description>HTTP, REST and some Cycling</description>
	<lastBuildDate>Mon, 15 Mar 2010 08:14:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: subbu</title>
		<link>http://www.subbu.org/blog/2008/10/double-post-and-poe/comment-page-1#comment-16882</link>
		<dc:creator>subbu</dc:creator>
		<pubDate>Sun, 18 Jan 2009 03:53:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.subbu.org/?p=403#comment-16882</guid>
		<description>I see. If you are writing the app for browsers, then the most common solution is anyway to include hidden form parameters, and do a 303 to the same page. When that page is regenerated, the server can include a different hidden parameter in the form. But it looks like you may be writing a specialized app.</description>
		<content:encoded><![CDATA[<p>I see. If you are writing the app for browsers, then the most common solution is anyway to include hidden form parameters, and do a 303 to the same page. When that page is regenerated, the server can include a different hidden parameter in the form. But it looks like you may be writing a specialized app.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mcm</title>
		<link>http://www.subbu.org/blog/2008/10/double-post-and-poe/comment-page-1#comment-16344</link>
		<dc:creator>mcm</dc:creator>
		<pubDate>Mon, 12 Jan 2009 12:05:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.subbu.org/?p=403#comment-16344</guid>
		<description>I agree when talking about an HTTP library as the client.

But I was talking about the user client. I don&#039;t want the user to be asked if a POE redirect should be followed. This problem occurs when the actual http library is supplied by the browser (like in ajax or xul apps; e.g. XmlHttpRequest). At least Firefox/XulRunner handle the 307 automatically and ask the user for confirmation. I couldn&#039;t find a way to override that behaviour.

That&#039;s why I&#039;m using a modified version of the original POE draft instead. Only modified it to exchange all poe related information in special, non-standard headers, instead of encoding it in the URI (because this was easier to implement in my case).</description>
		<content:encoded><![CDATA[<p>I agree when talking about an HTTP library as the client.</p>
<p>But I was talking about the user client. I don&#8217;t want the user to be asked if a POE redirect should be followed. This problem occurs when the actual http library is supplied by the browser (like in ajax or xul apps; e.g. XmlHttpRequest). At least Firefox/XulRunner handle the 307 automatically and ask the user for confirmation. I couldn&#8217;t find a way to override that behaviour.</p>
<p>That&#8217;s why I&#8217;m using a modified version of the original POE draft instead. Only modified it to exchange all poe related information in special, non-standard headers, instead of encoding it in the URI (because this was easier to implement in my case).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: subbu</title>
		<link>http://www.subbu.org/blog/2008/10/double-post-and-poe/comment-page-1#comment-16299</link>
		<dc:creator>subbu</dc:creator>
		<pubDate>Mon, 12 Jan 2009 02:59:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.subbu.org/?p=403#comment-16299</guid>
		<description>The use of 307 is intentional here. We don&#039;t want the client to automatically follow such a redirect.</description>
		<content:encoded><![CDATA[<p>The use of 307 is intentional here. We don&#8217;t want the client to automatically follow such a redirect.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mcm</title>
		<link>http://www.subbu.org/blog/2008/10/double-post-and-poe/comment-page-1#comment-13954</link>
		<dc:creator>mcm</dc:creator>
		<pubDate>Tue, 16 Dec 2008 11:19:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.subbu.org/?p=403#comment-13954</guid>
		<description>Thanks for this interesting idea. Might be fine for custom clients but will probably not work to well with standard browsers. &lt;a href=&quot;http://tools.ietf.org/html/rfc2616#section-10.3.8&quot; rel=&quot;nofollow&quot;&gt;RFC 2616&lt;/a&gt; states:

&lt;cite&gt;
If the 307 status code is received in response to a request other
than GET or HEAD, the user agent MUST NOT automatically redirect the
request unless it can be confirmed by the user, since this might
change the conditions under which the request was issued.
&lt;/cite&gt; 

And at least the current Firefox (3.0.4) asks for user confirmation on POST redirect (also when specifying a local/relative redirect location).

Since I am looking for a solution that works for my custom written client and for ordinary web browsers, I&#039;ll stay with the original POE draft and use the special POE headers defined in there. That will enable POE only for my custom client (since it requires custom request handling), but at least it won&#039;t break standard web browsers (since my server will still accept ordinary POST requests without POE header).

Any better suggestions?</description>
		<content:encoded><![CDATA[<p>Thanks for this interesting idea. Might be fine for custom clients but will probably not work to well with standard browsers. <a href="http://tools.ietf.org/html/rfc2616#section-10.3.8" rel="nofollow">RFC 2616</a> states:</p>
<p><cite><br />
If the 307 status code is received in response to a request other<br />
than GET or HEAD, the user agent MUST NOT automatically redirect the<br />
request unless it can be confirmed by the user, since this might<br />
change the conditions under which the request was issued.<br />
</cite> </p>
<p>And at least the current Firefox (3.0.4) asks for user confirmation on POST redirect (also when specifying a local/relative redirect location).</p>
<p>Since I am looking for a solution that works for my custom written client and for ordinary web browsers, I&#8217;ll stay with the original POE draft and use the special POE headers defined in there. That will enable POE only for my custom client (since it requires custom request handling), but at least it won&#8217;t break standard web browsers (since my server will still accept ordinary POST requests without POE header).</p>
<p>Any better suggestions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: subbu</title>
		<link>http://www.subbu.org/blog/2008/10/double-post-and-poe/comment-page-1#comment-5999</link>
		<dc:creator>subbu</dc:creator>
		<pubDate>Sun, 12 Oct 2008 00:56:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.subbu.org/?p=403#comment-5999</guid>
		<description>Thanks

This POE pattern does not require the server to determine if two given POST requests contained the same data. So it can fail fast.

In some cases, the fact that the request contained the same data may not necessarily mean that they are duplicate requests. Say, e.g. two requests to Twitter with the same data by the same user.

But if the server can determine that they are the same, and it also remembers the resource that was created the first time, instead of returning a 409, it can return a 303 (See Other) with the Location of that resource. That is, there is no need to fail the request in this case. If not, it can return a 405 (which I think is more appropriate than 409).</description>
		<content:encoded><![CDATA[<p>Thanks</p>
<p>This POE pattern does not require the server to determine if two given POST requests contained the same data. So it can fail fast.</p>
<p>In some cases, the fact that the request contained the same data may not necessarily mean that they are duplicate requests. Say, e.g. two requests to Twitter with the same data by the same user.</p>
<p>But if the server can determine that they are the same, and it also remembers the resource that was created the first time, instead of returning a 409, it can return a 303 (See Other) with the Location of that resource. That is, there is no need to fail the request in this case. If not, it can return a 405 (which I think is more appropriate than 409).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Franz</title>
		<link>http://www.subbu.org/blog/2008/10/double-post-and-poe/comment-page-1#comment-5991</link>
		<dc:creator>James Franz</dc:creator>
		<pubDate>Sat, 11 Oct 2008 23:33:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.subbu.org/?p=403#comment-5991</guid>
		<description>First off great post, keep up the good work, this is one of my favorite blogs.

I just wanted to throw out a idea, why not take a hash of the POST request data (or a subset of it, whatever determines uniqueness) and store it on the server to match with the success of the POST.  This would be the &quot;transaction id&quot; of sorts.  If a client then submits a duplicate POST, the hash would match and you&#039;d throw a 409? error.

By using a hash of the POST variables, you could even choose the variables that make the POST unique.  If what we are trying to prevent is duplicate POST transactions, what easier way would there be other than comparing the data sent in the POST request?

&lt;i&gt;What am I missing?&lt;/i&gt;</description>
		<content:encoded><![CDATA[<p>First off great post, keep up the good work, this is one of my favorite blogs.</p>
<p>I just wanted to throw out a idea, why not take a hash of the POST request data (or a subset of it, whatever determines uniqueness) and store it on the server to match with the success of the POST.  This would be the &#8220;transaction id&#8221; of sorts.  If a client then submits a duplicate POST, the hash would match and you&#8217;d throw a 409? error.</p>
<p>By using a hash of the POST variables, you could even choose the variables that make the POST unique.  If what we are trying to prevent is duplicate POST transactions, what easier way would there be other than comparing the data sent in the POST request?</p>
<p><i>What am I missing?</i></p>
]]></content:encoded>
	</item>
</channel>
</rss>
