<?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 for evardsson.com: stuff that w0rks</title>
	<atom:link href="http://www.evardsson.com/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.evardsson.com/blog</link>
	<description>tweaks and hacks, php, python, music, home and ???</description>
	<lastBuildDate>Thu, 08 Mar 2012 04:48:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>Comment on Try out Chrome OS in a VM &#8211; even Parallels! by Len Popat</title>
		<link>http://www.evardsson.com/blog/2009/11/21/try-out-chrome-os-in-a-vm-even-parallels/comment-page-1/#comment-1713</link>
		<dc:creator>Len Popat</dc:creator>
		<pubDate>Thu, 08 Mar 2012 04:48:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.evardsson.com/blog/?p=384#comment-1713</guid>
		<description>Trackback
[...] We stumbled over here coming from a different website and thought I should check things [...]</description>
		<content:encoded><![CDATA[<p>Trackback<br />
[...] We stumbled over here coming from a different website and thought I should check things [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fix for firehol get-iana script by Alex</title>
		<link>http://www.evardsson.com/blog/2010/06/28/fix-for-firehol-get-iana-script/comment-page-1/#comment-1688</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Mon, 09 Jan 2012 14:18:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.evardsson.com/blog/?p=404#comment-1688</guid>
		<description>Thank you!</description>
		<content:encoded><![CDATA[<p>Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Useful custom 403 and 404 error pages with PHP by Sjan Evardsson</title>
		<link>http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/comment-page-1/#comment-1507</link>
		<dc:creator>Sjan Evardsson</dc:creator>
		<pubDate>Sun, 11 Sep 2011 16:16:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/#comment-1507</guid>
		<description>Very true, if you are not using the Apache built-in custom error page behavior. (Apache will set the proper headers when you are.)

In cases where you are using mod_rewrite to point everything to an app (like WordPress and others) you want to make sure that your error pages do set the proper error code in the header.</description>
		<content:encoded><![CDATA[<p>Very true, if you are not using the Apache built-in custom error page behavior. (Apache will set the proper headers when you are.)</p>
<p>In cases where you are using mod_rewrite to point everything to an app (like WordPress and others) you want to make sure that your error pages do set the proper error code in the header.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Useful custom 403 and 404 error pages with PHP by Svante</title>
		<link>http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/comment-page-1/#comment-1506</link>
		<dc:creator>Svante</dc:creator>
		<pubDate>Sun, 11 Sep 2011 09:58:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/#comment-1506</guid>
		<description>Don&#039;t forget to include the error code in the header! A simple header(&quot;HTTP/1.0 404 Not Found&quot;) at the beginning of the custom 404 document would do.</description>
		<content:encoded><![CDATA[<p>Don&#8217;t forget to include the error code in the header! A simple header(&#8220;HTTP/1.0 404 Not Found&#8221;) at the beginning of the custom 404 document would do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Try out Chrome OS in a VM &#8211; even Parallels! by Rob</title>
		<link>http://www.evardsson.com/blog/2009/11/21/try-out-chrome-os-in-a-vm-even-parallels/comment-page-1/#comment-1504</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Mon, 29 Aug 2011 07:52:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.evardsson.com/blog/?p=384#comment-1504</guid>
		<description>If you&#039;re using Parallels on Mac you can download a Chromium OS image directly from them. Very easy.</description>
		<content:encoded><![CDATA[<p>If you&#8217;re using Parallels on Mac you can download a Chromium OS image directly from them. Very easy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Apache and PHP HTTP PUT Voodoo by HTTP File Upload Libcurl - Page 2</title>
		<link>http://www.evardsson.com/blog/2010/04/27/apache-and-php-http-put-voodoo/comment-page-1/#comment-1335</link>
		<dc:creator>HTTP File Upload Libcurl - Page 2</dc:creator>
		<pubDate>Thu, 21 Jul 2011 03:08:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.evardsson.com/blog/?p=399#comment-1335</guid>
		<description>[...] 1,797          You&#039;re trying to do an HTTP PUT to an Apache server. I don&#039;t believe that Apache supports PUT out of the box, hence the &quot;Method not allowed&quot; error. You need to properly configure Apache to support PUT. Here&#039;s one link to that end. [...]</description>
		<content:encoded><![CDATA[<p>[...] 1,797          You&#039;re trying to do an HTTP PUT to an Apache server. I don&#039;t believe that Apache supports PUT out of the box, hence the &quot;Method not allowed&quot; error. You need to properly configure Apache to support PUT. Here&#039;s one link to that end. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Apache and PHP HTTP PUT Voodoo by Sjan Evardsson</title>
		<link>http://www.evardsson.com/blog/2010/04/27/apache-and-php-http-put-voodoo/comment-page-1/#comment-1312</link>
		<dc:creator>Sjan Evardsson</dc:creator>
		<pubDate>Sun, 17 Jul 2011 17:59:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.evardsson.com/blog/?p=399#comment-1312</guid>
		<description>Sure thing. This is a test script that just spits back your request. I am sure you can see how to extend this to pass the data through to your API. Cheers.
&lt;pre&gt;
 &lt;?php
$key = ($_REQUEST[&#039;apikey&#039;])?$_REQUEST[&#039;apikey&#039;]:&#039;&#039;;
function getHeaders()
{
	$headers = array();
	if (function_exists(&#039;apache_request_headers&#039;))
	{
		$headers = apache_request_headers();
	}
	else
	{
		foreach ($_SERVER as $k =&gt; $v)
		{
			if (substr($k, 0, 5) == &quot;HTTP_&quot;)
			{
				$k = str_replace(&#039; &#039;, &#039;-&#039;, str_replace(&#039;_&#039;, &#039; &#039;, ucwords(strtolower(substr($k, 5)))));
				$headers[$k] = $v;
			}
		}
	}
	return $headers;
}
$verb = strtolower($_SERVER[&#039;REQUEST_METHOD&#039;]);
$data	= array();
switch ($verb)
{
	case &#039;get&#039;:
		$data = $_GET;
		break;
	case &#039;post&#039;:
		$data = $_POST;
		break;
	case &#039;put&#039;:
		parse_str(file_get_contents(&#039;php://input&#039;), $put_data);
		$data = $put_data;
		break;
}

print &lt;&lt;&lt;EOD1
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;&lt;title&gt;test&lt;/title&gt;&lt;/head&gt;
&lt;body&gt;&lt;pre&gt;
&lt;b&gt;Request:&lt;/b&gt;


EOD1;
print_r($_REQUEST);

echo &quot;\n\n&lt;b&gt;Headers:&lt;/b&gt;\n\n&quot;;
print_r(getHeaders());

echo &quot;\n\n&lt;b&gt;Verb:&lt;/b&gt;\n\n&quot;;
print_r($verb);

echo &quot;\n\n&lt;b&gt;Data:&lt;/b&gt;\n\n&quot;;
print_r($data);
print &lt;&lt;&lt;EOD
&lt;/pre&gt;
&lt;/body&gt;&lt;/html&gt;

EOD;
?&gt;</description>
		<content:encoded><![CDATA[<p>Sure thing. This is a test script that just spits back your request. I am sure you can see how to extend this to pass the data through to your API. Cheers.</p>
<pre>
 &lt;?php
$key = ($_REQUEST['apikey'])?$_REQUEST['apikey']:'';
function getHeaders()
{
	$headers = array();
	if (function_exists('apache_request_headers'))
	{
		$headers = apache_request_headers();
	}
	else
	{
		foreach ($_SERVER as $k => $v)
		{
			if (substr($k, 0, 5) == "HTTP_")
			{
				$k = str_replace(' ', '-', str_replace('_', ' ', ucwords(strtolower(substr($k, 5)))));
				$headers[$k] = $v;
			}
		}
	}
	return $headers;
}
$verb = strtolower($_SERVER['REQUEST_METHOD']);
$data	= array();
switch ($verb)
{
	case 'get':
		$data = $_GET;
		break;
	case 'post':
		$data = $_POST;
		break;
	case 'put':
		parse_str(file_get_contents('php://input'), $put_data);
		$data = $put_data;
		break;
}

print &lt;&lt;&lt;EOD1
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;&lt;title&gt;test&lt;/title&gt;&lt;/head&gt;
&lt;body&gt;&lt;pre&gt;
&lt;b&gt;Request:&lt;/b&gt;

EOD1;
print_r($_REQUEST);

echo "\n\n&lt;b&gt;Headers:&lt;/b&gt;\n\n";
print_r(getHeaders());

echo "\n\n&lt;b&gt;Verb:&lt;/b&gt;\n\n";
print_r($verb);

echo "\n\n&lt;b&gt;Data:&lt;/b&gt;\n\n";
print_r($data);
print &lt;&lt;&lt;EOD
&lt;/pre&gt;
&lt;/body&gt;&lt;/html&gt;

EOD;
?&gt;</pre>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Apache and PHP HTTP PUT Voodoo by ramzez</title>
		<link>http://www.evardsson.com/blog/2010/04/27/apache-and-php-http-put-voodoo/comment-page-1/#comment-1311</link>
		<dc:creator>ramzez</dc:creator>
		<pubDate>Fri, 08 Jul 2011 11:10:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.evardsson.com/blog/?p=399#comment-1311</guid>
		<description>Can you make put.php script make available? thanks!</description>
		<content:encoded><![CDATA[<p>Can you make put.php script make available? thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fix for firehol get-iana script by Sjan Evardsson</title>
		<link>http://www.evardsson.com/blog/2010/06/28/fix-for-firehol-get-iana-script/comment-page-1/#comment-1306</link>
		<dc:creator>Sjan Evardsson</dc:creator>
		<pubDate>Thu, 19 May 2011 18:14:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.evardsson.com/blog/?p=404#comment-1306</guid>
		<description>Thanks, Andrew. That should help those who wish to communicate in the multicast space.

In terms of aggregation I have not seen any noticeable difference in latency using the aggregate values (/4s) versus the non-aggregate (/8s). I would imagine that it makes the RESERVED_IPS file shorter, which may speed up startup times and possibly reduce iptables memory usage slightly.

That might be something to work out and add to the script as well ...</description>
		<content:encoded><![CDATA[<p>Thanks, Andrew. That should help those who wish to communicate in the multicast space.</p>
<p>In terms of aggregation I have not seen any noticeable difference in latency using the aggregate values (/4s) versus the non-aggregate (/8s). I would imagine that it makes the RESERVED_IPS file shorter, which may speed up startup times and possibly reduce iptables memory usage slightly.</p>
<p>That might be something to work out and add to the script as well &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fix for firehol get-iana script by Andrew</title>
		<link>http://www.evardsson.com/blog/2010/06/28/fix-for-firehol-get-iana-script/comment-page-1/#comment-1305</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Thu, 19 May 2011 16:47:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.evardsson.com/blog/?p=404#comment-1305</guid>
		<description>Adding this to the Python script removes the multicast entries. With this addition the output is the same as the stock get-iana script except the IP&#039;s are not agregated meaning you may end up with several /8 networks instead of a /4. For example:

240.0.0.0/8
...
255.0.0.0/8

versus

240.0.0.0/4

Here are the changes:
&lt;pre class=&quot;brush:python&quot;&gt;
                    if k.localName == &#039;status&#039;:
                        status = k.firstChild.data
                    if k.localName == &#039;designation&#039;:
                        designation = k.firstChild.data
                if status == &#039;RESERVED&#039; or status == &#039;UNALLOCATED&#039;:
                        if designation != &#039;Multicast&#039;:
                                results.append(prefix)
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Adding this to the Python script removes the multicast entries. With this addition the output is the same as the stock get-iana script except the IP&#8217;s are not agregated meaning you may end up with several /8 networks instead of a /4. For example:</p>
<p>240.0.0.0/8<br />
&#8230;<br />
255.0.0.0/8</p>
<p>versus</p>
<p>240.0.0.0/4</p>
<p>Here are the changes:</p>
<pre class="brush:python">
                    if k.localName == 'status':
                        status = k.firstChild.data
                    if k.localName == 'designation':
                        designation = k.firstChild.data
                if status == 'RESERVED' or status == 'UNALLOCATED':
                        if designation != 'Multicast':
                                results.append(prefix)
</pre>
]]></content:encoded>
	</item>
</channel>
</rss>

