<?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>Andrew R. Jones &#187; Perl</title>
	<atom:link href="http://andrew-jones.com/tag/perl/feed/" rel="self" type="application/rss+xml" />
	<link>http://andrew-jones.com</link>
	<description>Andrew Jones' Site</description>
	<lastBuildDate>Tue, 01 Dec 2009 20:30:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Kino Search Add-On Released for Foswiki</title>
		<link>http://andrew-jones.com/2009/09/24/kino-search-add-on-released-for-foswiki/</link>
		<comments>http://andrew-jones.com/2009/09/24/kino-search-add-on-released-for-foswiki/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 20:42:30 +0000</pubDate>
		<dc:creator>Andrew Jones</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Foswiki]]></category>
		<category><![CDATA[Kino Search]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Search]]></category>

		<guid isPermaLink="false">http://andrew-jones.com/?p=386</guid>
		<description><![CDATA[After a lot of work I have finally released the new Kino Search extensions for Foswiki.
Kino Search is a Perl port of the Lucene indexed based search engine from Apache. The Foswiki extensions use this to provide fast, full text search of both topics and attachments. The attachments that can be indexed include MS Office [...]]]></description>
			<content:encoded><![CDATA[<p>After a lot of work I have finally released the new Kino Search extensions for Foswiki.</p>
<p><a href="http://www.rectangular.com/kinosearch/">Kino Search</a> is a Perl port of the <a href="http://lucene.apache.org/java/docs/">Lucene</a> indexed based search engine from Apache. The Foswiki extensions use this to provide fast, full text search of both topics and attachments. The attachments that can be indexed include MS Office 2003 and 2007 documents and PDF files.</p>
<p>This original add-on was available for TWiki but I have now ported this over as a new <a href="http://foswiki.org/Extensions/KinoSearchContrib">KinoSearchContrib</a> and <a href="http://foswiki.org/Extensions/KinoSearchPlugin">KinoSearchPlugin</a> and made many improvements, including:</p>
<ul>
<li>Fast CGI and mod_perl support</li>
<li>Indexing MS Office 2007 files</li>
<li>Much more resilient indexing
<ul>
<li>In particular when indexing password protected files or when an incorrect file type is supplied (such as attaching a image and calling it myfile.txt)</li>
</ul>
</li>
<li>Using more of the official Foswiki API</li>
<li>Improved documentation and templates</li>
</ul>
<p>There have been other technical improvements that are behind the scenes. The extensions also comes with a good testing suite, helping to ensure that it is of good quality.</p>
<p>For more information, see my posting on the <a href="http://blog.foswiki.org/2009/09/new-kino-search-extensions-released-for-foswiki/">official Foswiki blog</a> (although remember that I wrote both, so the wording is similar&#8230;).</p>
]]></content:encoded>
			<wfw:commentRss>http://andrew-jones.com/2009/09/24/kino-search-add-on-released-for-foswiki/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Removing Referral URL Using a Perl Proxy Script</title>
		<link>http://andrew-jones.com/2009/02/03/removing-referral-url-using-a-perl-proxy-script/</link>
		<comments>http://andrew-jones.com/2009/02/03/removing-referral-url-using-a-perl-proxy-script/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 21:57:03 +0000</pubDate>
		<dc:creator>Andrew Jones</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://andrew-jones.com/?p=133</guid>
		<description><![CDATA[When you follow links on the internet, your browser will send a referral URL to the server to let it know where it has came from. This can often be useful to the server administrators, as you can use these to analyse how visitors are finding your site or a particular page.
However, there can also [...]]]></description>
			<content:encoded><![CDATA[<p>When you follow links on the internet, your browser will send a referral URL to the server to let it know where it has came from. This can often be useful to the server administrators, as you can use these to analyse how visitors are finding your site or a particular page.</p>
<p>However, there can also be times when the user does not to share this information. Some users might say that it is an invasion of privacy. You might also be coming from a corporate intranet, and are worried about sharing internal URLs with outside servers.</p>
<p>Luckily it is very easy to spoof or remove the referral URL. Some web browsers, such as Opera, allow the user to disable referrer logging<sup>[1]</sup>, while it can also be removed by the firewall or the anti-virus software. This method uses a small proxy script to trick the browser into thinking that there was no referral URL, as if a user has entered the URL straight into their browsers location bar.</p>
<h4 id="toc-the-script">The Script</h4>
<p>The script itself is extremely simple and is shown below.</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!perl</span>
&nbsp;
<span style="color: #000066;">print</span> <span style="color: #cc0000; font-style: italic;">&lt;&lt;EOT;
Content-type: text/htmln
&lt;html&gt;&lt;head&gt;
&lt;meta http-equiv=&quot;refresh&quot; content=&quot;0; URL=$ENV{QUERY_STRING}&quot;&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
window.location=&quot;$ENV{QUERY_STRING}&quot;;
&lt;/script&gt;
&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;
EOT</span></pre></div></div>

<p>The variable <code>$ENV{QUERY_STRING}</code> contains the part of the link that comes after the first question mark. So for <code>http://andrew-jones.com?http://wikipedia.org</code> it would contain <code>http://wikipedia.org</code>. It does not do anything with the string, so any ampersands or further question marks are left as they are.</p>
<p>The script has two was of redirecting the user. The first uses the <code>meta</code> tag. This tells the browser to refresh instantly (0 seconds) and load the URL that is in <code>$ENV{QUERY_STRING}</code>. As the browser thinks it has just reloaded, it does not send the referrer information with the request.</p>
<p>As not all browsers understand the <code>meta</code> tag, we have also used some simple JavaScript to do the redirect. As you could probably guess, the JavaScript causes the browser to redirect to the location that we have set. This will probably not be used, as most browsers do understand the <code>meta</code> tag.</p>
<p>As a last resort we could also have made a HTML link that the user can click on if the browser will not redirect them, but this will cause the URL of the script to be used as the referrer URL, which may not be desirable.</p>
<h4 id="toc-summary">Summary</h4>
<p>So this very simple proxy script will take any URL that&#8217;s passed in and redirect the user without the browser passing a referrer URL, for whatever reason you might have. It also works with links that may contain parameters, such as <code>http://www.google.co.uk/search?q=site:wikipedia.org+http</code>. Hope you found it useful.</p>
<h4 id="toc-links">Links</h4>
<ul>
<li><a title="Wikipedia Article" href="http://en.wikipedia.org/wiki/Referer">Wikipedia Article</a></li>
<li style="text-align: left;"><a title="Article on Nation Master" href="http://www.nationmaster.com/encyclopedia/Referer">Article on NationMaster</a></li>
</ul>
<h4>References</h4><ol class="footnotes"><li id="footnote_0_133" class="footnote">http://www.opera.com/support/kb/view/93/</li></ol>]]></content:encoded>
			<wfw:commentRss>http://andrew-jones.com/2009/02/03/removing-referral-url-using-a-perl-proxy-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
