<?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>Defective Semantics &#187; apache</title>
	<atom:link href="http://scarff.id.au/blog/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://scarff.id.au</link>
	<description>Dean Scarff's perpetual struggle with technology, and other anecdotes</description>
	<lastBuildDate>Thu, 03 Nov 2011 22:39:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Apache 304 and mod_deflate revisited</title>
		<link>http://scarff.id.au/blog/2009/apache-304-and-mod_deflate-revisited/</link>
		<comments>http://scarff.id.au/blog/2009/apache-304-and-mod_deflate-revisited/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 03:51:42 +0000</pubDate>
		<dc:creator>Dean</dc:creator>
				<category><![CDATA[Problems]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[rfc2616]]></category>

		<guid isPermaLink="false">http://scarff.id.au/?p=290</guid>
		<description><![CDATA[<p>Last year I commented on how mod_deflate breaks the cache validation model.  Essentially the problem has been addressing two issues:</p>
<ul>
<li>Apache bug #39727, RFC 2616 requires unique strong entity tags for every entity.  Presumably this means after Content-Encoding (but not Transfer-Encoding).  The fix was for deflate to add &#8220;-gzip&#8221; to the ETag.</li>
<li>Apache bug #45023 concerns Apache not being able to recognise the transformed ETag (with the -gzip) as the same entity, and hence not sending 304s when it should have.</li>
</ul>
<p>So in January 2008, a change was committed to fix #39727, which introduced #45023.  Now in April this year, it was reversed to fix #45023.  I agree with the priorities here; no caching is much worse for web performance.</p>
<p>As Roy Fielding pointed out the correct way to deal with this issue is to stop abusing Content-Encoding for performance-compression and start using Transfer-Encoding; pity browsers and HTTP&#8230; <a href="http://scarff.id.au/blog/2009/apache-304-and-mod_deflate-revisited/" class="read_more">more</a></p>]]></description>
			<content:encoded><![CDATA[<p>Last year I commented on how <a href="/blog/2008/apache-304s-and-mod_deflate/">mod_deflate breaks the cache validation model</a>.  Essentially the problem has been addressing two issues:</p>
<ul>
<li><a href="https://issues.apache.org/bugzilla/show_bug.cgi?id=39727">Apache bug #39727</a>, <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11">RFC 2616 requires unique strong entity tags</a> for every entity.  Presumably this means after Content-Encoding (but not Transfer-Encoding).  The fix was for deflate to add &#8220;-gzip&#8221; to the ETag.</li>
<li><a href="https://issues.apache.org/bugzilla/show_bug.cgi?id=45023">Apache bug #45023</a> concerns Apache not being able to recognise the transformed ETag (with the -gzip) as the same entity, and hence not sending 304s when it should have.</li>
</ul>
<p>So in January 2008, a change was committed to fix #39727, which introduced #45023.  Now in April this year, it was reversed to fix #45023.  I agree with the priorities here; no caching is much worse for web performance.</p>
<p>As <a href="https://issues.apache.org/bugzilla/show_bug.cgi?id=39727#c31">Roy Fielding pointed out</a> the correct way to deal with this issue is to stop abusing Content-Encoding for performance-compression and start using Transfer-Encoding; pity browsers and HTTP servers haven&#8217;t got there yet. </p>
]]></content:encoded>
			<wfw:commentRss>http://scarff.id.au/blog/2009/apache-304-and-mod_deflate-revisited/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache 304s and mod_deflate</title>
		<link>http://scarff.id.au/blog/2008/apache-304s-and-mod_deflate/</link>
		<comments>http://scarff.id.au/blog/2008/apache-304s-and-mod_deflate/#comments</comments>
		<pubDate>Sat, 21 Jun 2008 12:18:59 +0000</pubDate>
		<dc:creator>Dean</dc:creator>
				<category><![CDATA[Problems]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[http]]></category>

		<guid isPermaLink="false">http://scarff.id.au/?p=39</guid>
		<description><![CDATA[<p>The deflate output filter in Apache breaks Apache&#8217;s handling of the HTTP cache validation model.  It won&#8217;t send an HTTP 304 status if mod_deflate is actively filtering the response, even if the Etag and Last-Modified allow it to.  I asked, and apparently this is a known issue.  I might have to wait until after exams before making a patch for this one.</p>
<p>In its current state, this introduces a tradeoff for large, uncompressed static files (like CSS and Javascript):</p>
<ul>
<li>gzip stuff, and you improve site performance the first time someone visits, but it never gets any faster.</li>
<li>allow Apache to send 304 statuses, let the user have a slow load on their first visit, but celebrate as they hit their cache thereafter</li>
</ul>
<p>The second option looks more attractive.</p>
]]></description>
			<content:encoded><![CDATA[<p>The deflate output filter in Apache breaks Apache&#8217;s handling of the <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.3">HTTP cache validation model</a>.  It won&#8217;t send an HTTP 304 status if mod_deflate is actively filtering the response, even if the Etag and Last-Modified allow it to.  I <a href="http://permalink.gmane.org/gmane.comp.apache.user/77853">asked</a>, and <a href="http://permalink.gmane.org/gmane.comp.apache.user/77854">apparently</a> this is a <a href="https://issues.apache.org/bugzilla/show_bug.cgi?id=45023">known issue</a>.  I might have to wait until after exams before making a patch for this one.</p>
<p>In its current state, this introduces a tradeoff for large, uncompressed static files (like CSS and Javascript):</p>
<ul>
<li>gzip stuff, and you improve site performance the first time someone visits, but it never gets any faster.</li>
<li>allow Apache to send 304 statuses, let the user have a slow load on their first visit, but celebrate as they hit their cache thereafter</li>
</ul>
<p>The second option looks more attractive.</p>
]]></content:encoded>
			<wfw:commentRss>http://scarff.id.au/blog/2008/apache-304s-and-mod_deflate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

