[Templates] Apache::Template ETag bug

[prev] [thread] [next] [Date index for 2004/07/06]

From: Geoffrey Young
Subject: [Templates] Apache::Template ETag bug
Date: 15:31 on 06 Jul 2004
This is a multi-part message in MIME format.
--------------060007020608080900050004
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

hi andy

Apache::Template has a minor bug wrt the ETag header.  see

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.19

--Geoff

--------------060007020608080900050004
Content-Type: text/x-patch;
 name="etag.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="etag.patch"

--- lib/Template/Service/Apache.pm.orig	2004-07-06 11:28:26.000000000 -0400
+++ lib/Template/Service/Apache.pm	2004-07-06 11:28:50.000000000 -0400
@@ -162,7 +162,7 @@
         if $all or $headers->{ length };
     $r->headers_out->add('Last-Modified'  => ht_time($template->modtime()))
         if $all or $headers->{ modified } and $template;
-    $r->headers_out->add('E-tag' => sprintf q{"%s"}, md5_hex($$content))
+    $r->headers_out->add('ETag' => sprintf q{"%s"}, md5_hex($$content))
         if $all or $headers->{ etag };
     $r->send_http_header;
 }
--- lib/Apache/Template.pm.orig	2004-07-06 11:28:18.000000000 -0400
+++ lib/Apache/Template.pm	2004-07-06 11:28:34.000000000 -0400
@@ -1017,7 +1017,7 @@
 Allows you to specify which HTTP headers you want added to the
 response.  Current permitted values are: 'type' (Content-Type),
 'length' (Content-Length), 'modified' (Last-Modified) and 'etag'
-(E-Tag).
+(ETag).
 
     TT2Headers      type length
 

--------------060007020608080900050004--

_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] Apache::Template ETag bug
Geoffrey Young 15:31 on 06 Jul 2004

Generated at 08:55 on 15 Mar 2005 by mariachi v0.52