<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>KTORIUM &#187; http</title>
	<atom:link href="http://blog.ktorium.com/category/http/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ktorium.com</link>
	<description>Tal Kedar&#039;s Orchard</description>
	<lastBuildDate>Tue, 21 Jul 2009 19:17:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The nnCoection response header</title>
		<link>http://blog.ktorium.com/2009/06/the-nncoection-response-header/</link>
		<comments>http://blog.ktorium.com/2009/06/the-nncoection-response-header/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 22:44:41 +0000</pubDate>
		<dc:creator>Tal Kedar</dc:creator>
				<category><![CDATA[http]]></category>

		<guid isPermaLink="false">http://www.ktorium.com/blog/?p=6</guid>
		<description><![CDATA[I thought I&#8217;ve stumbled on some hand-crafted response from Amazon:

$ nc -vv www.amazon.com 80
Connection to www.amazon.com 80 port [tcp/http] succeeded!
GET / HTTP/1.1

HTTP/1.1 400 Bad Request
Date: Wed, 17 Jun 2009 22:31:39 GMT
Server: Server
Content-Length: 226
nnCoection: close
Content-Type: text/html; charset=iso-8859-1

&#60;!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"&#62;
&#60;html&#62;&#60;head&#62;
&#60;title&#62;400 Bad Request&#60;/title&#62;
&#60;/head&#62;&#60;body&#62;
&#60;h1&#62;Bad Request&#60;/h1&#62;
&#60;p&#62;Your browser sent a request that this server could not understand.&#60;br&#160;/&#62;
&#60;/p&#62;
&#60;/body&#62;&#60;/html&#62;

Note the [...]]]></description>
			<content:encoded><![CDATA[<p>I thought I&#8217;ve stumbled on some hand-crafted response from <a href="http://www.amazon.com">Amazon</a>:
<pre class="code">
$ nc -vv www.amazon.com 80
Connection to www.amazon.com 80 port [tcp/http] succeeded!
GET / HTTP/1.1

HTTP/1.1 400 Bad Request
Date: Wed, 17 Jun 2009 22:31:39 GMT
Server: Server
Content-Length: 226
nnCoection: close
Content-Type: text/html; charset=iso-8859-1

&lt;!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"&gt;
&lt;html&gt;&lt;head&gt;
&lt;title&gt;400 Bad Request&lt;/title&gt;
&lt;/head&gt;&lt;body&gt;
&lt;h1&gt;Bad Request&lt;/h1&gt;
&lt;p&gt;Your browser sent a request that this server could not understand.&lt;br&nbsp;/&gt;
&lt;/p&gt;
&lt;/body&gt;&lt;/html&gt;
</pre>
Note the <code>nnCoection: close</code> response header. The <code>400</code> response is returned, in this case, because of a missing <code>Host</code> request header.</p>
<p>Turns out the spelling mistake is intentional &#8211; Andrew Wooster&#8217;s excellent <a href="http://www.nextthing.org/archives/2005/08/07/fun-with-http-headers">post</a> claims that the header is changed by a load-balancing service, overriding the web server&#8217;s directive. A comment on that post identifies the service as the <a href="http://www.citrix.com/english/ps2/products/product.asp?contentID=21679">Citrix NetScaler</a> appliance, and explains the logic of scrambling rather than removing the header altogether. Cool stuff.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ktorium.com/2009/06/the-nncoection-response-header/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
