<?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>Ponton&#039;s site &#187; http</title>
	<atom:link href="http://www.ponton.srednikpe.org/tag/http/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ponton.srednikpe.org</link>
	<description>blog głównie matematyczno-informatyczny (nie chce mi się pisać o życiu)</description>
	<lastBuildDate>Mon, 18 Jan 2010 22:23:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>pyhttpd &#8211; a tiny HTTP deamon written in Python</title>
		<link>http://www.ponton.srednikpe.org/2008/02/11/pyhttpd-a-tiny-http-deamon-written-in-python/</link>
		<comments>http://www.ponton.srednikpe.org/2008/02/11/pyhttpd-a-tiny-http-deamon-written-in-python/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 18:21:24 +0000</pubDate>
		<dc:creator>ponton</dc:creator>
				<category><![CDATA[Computer science and math]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[my code]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.ponton.srednikpe.org/2008/02/11/pyhttpd-a-tiny-http-deamon-written-in-python/</guid>
		<description><![CDATA[It&#8217;s for my Python Course. It provides only very basic HTTP, but yet can be used for simple WWW hosting. Source. Features: GET and POST methods New thread for new connection Directory listing Error pages Document index Deafult type and charset Python scripts ;) Configuration file &#8230; and my own modules to handle these TODOs: [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s for my Python Course. It provides only very basic HTTP, but yet can be used for simple WWW hosting. <a title="pyhttpd" href="http://www.srednikpe.org/src/pyhttpd/">Source</a>.</p>
<p>Features:</p>
<ul>
<li>GET and POST methods</li>
<li>New thread for new connection</li>
<li>Directory listing</li>
<li>Error pages</li>
<li>Document index</li>
<li>Deafult type and charset</li>
<li>Python scripts ;)</li>
<li>Configuration file</li>
<li>&#8230; and my own modules to handle these</li>
</ul>
<p>TODOs:</p>
<ul>
<li>Logging</li>
<li>Much more stability (exceptions handling, etc.)</li>
<li>Sending gzipped or chunked data (if accepted)</li>
<li>Range headers</li>
<li>&#8230; and many, many other</li>
</ul>
<p>To run just edit pyhttpd.conf and change Port and Document root. Then type &#8220;python pyhttpd.py&#8221; and it should be now listening for connections.</p>
<p>How to run a python script and its output send to client? Pyhttpd checks if the requesting file is a python one. If so then it opens a python interpreter by a pipe, sends _GET and _POST dictionaries and file contents. And finally, sends interpreter outputs to client.</p>
<p>_GET and_POST are just dictionaries with variable names as keys. So if there is a foobar.py?i=500 request then _GET will be { &#8216;i&#8217; : &#8217;500&#8242; } (note that this is always a string value).</p>
<p>It&#8217;s GPL if someone asked.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ponton.srednikpe.org/2008/02/11/pyhttpd-a-tiny-http-deamon-written-in-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
