]> granicus.if.org Git - apache/commitdiff
* Only drop the last char (the '"') and not the last one of the etag itself.
authorRuediger Pluem <rpluem@apache.org>
Sat, 7 Feb 2009 09:25:28 +0000 (09:25 +0000)
committerRuediger Pluem <rpluem@apache.org>
Sat, 7 Feb 2009 09:25:28 +0000 (09:25 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@741865 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/mod_deflate.c

index 1266d90c3fc6755f56a9194dbb12351b0ad0f5c6..b512c3b0177aa36b03fe7809c8a1704e8b84f842 100644 (file)
@@ -395,7 +395,7 @@ static void deflate_check_etag(request_rec *r, const char *transform)
     const char *etag = apr_table_get(r->headers_out, "ETag");
     if ((etag && (strlen(etag) > 2))) {
         if (etag[0] == '"') {
-            etag = apr_pstrndup(r->pool, etag, strlen(etag) - 2);
+            etag = apr_pstrndup(r->pool, etag, strlen(etag) - 1);
             apr_table_set(r->headers_out, "ETag",
                           apr_pstrcat(r->pool, etag, "-", transform, "\"", NULL));
         }