<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">

  <channel>
	<title>LightPress</title>
	<link>http://lightpress.org</link>
	<description>A fast, template-based frontend for WordPress</description>
	<pubDate>Wed, 05 Oct 2005 14:53:16 GMT</pubDate>
	<generator>http://blogo.it/frontend/</generator>
    
	
    <item>
      <title>PHP, HTTP/1.1 dates and Conditional Get</title>
      <link>http://lightpress.org/post/php-http11-dates-and-conditional-get</link>
      <guid>http://lightpress.org/post/php-http11-dates-and-conditional-get</guid>
      <pubDate>Wed, 08 Jun 2005 15:03:47 GMT</pubDate>
      <description><![CDATA[<p>One of the benefits we might get from the <a href="http://lightpress.org/post/is-frontend-too-big#249">new architecture I'm testing</a> is a much more integrated and simpler feed management, so while adapting the current code to the new class layout I took the occasion to revise or support for <a href="http://fishbowl.pastiche.org/archives/001132.html">Conditional Get</a>.</p>
<p>I had already adapted <a href="http://simon.incutio.com/archive/2003/04/23/conditionalGet">Simon Willison's code</a> to work around a <a href="http://bugs.php.net/bug.php?id=31842">bug in PHP's</p>
<code>
date</code>
<p>formats</a> (fixed in 4.3.11), but the code was a bit too complex for my tastes, and re-reading the relevant parts of the <a href="http://www.faqs.org/rfcs/rfc2616.html" title="RFC2616#3.3.1">HTTP/1.1 specification</a>, I noticed that full compliance requires supporting three different date formats, all in GMT:</p>
<blockquote>
<p>Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123<br />
<br /><br />
Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036<br />
<br /><br />
Sun Nov  6 08:49:37 1994       ; ANSI C's asctime() format</p>
<p>All HTTP date/time stamps MUST be represented in Greenwich Mean Time (GMT), without exception.</p>
<p>HTTP/1.1 clients and servers that parse the date value MUST accept all three formats (for compatibility with HTTP/1.0), though they MUST only generate the RFC 1123 format for representing HTTP-date values in header fields.</p>
</blockquote>
<p> <a href="http://lightpress.org/post/php-http11-dates-and-conditional-get">continued</a>]]></description>
    </item>
	
    
  </channel>
</rss>
