Changes with Apache 2.3.2
[ When backported to 2.2.x, remove entry from this file ]
+ *) mod_deflate: Fix creation of invalid Etag headers. We now make sure
+ that the Etag value is properly quoted when adding the gzip marker.
+ PR 39727. [Lars Eilebrecht]
+
*) Added 20x22 icons for ODF, SVG, and XML documents. PR 37185.
[Peter Harlow]
static void deflate_check_etag(request_rec *r, const char *transform)
{
const char *etag = apr_table_get(r->headers_out, "ETag");
- if (etag && (((etag[0] != 'W') && (etag[0] !='w')) || (etag[1] != '/'))) {
- apr_table_set(r->headers_out, "ETag",
- apr_pstrcat(r->pool, etag, "-", transform, NULL));
- }
+ if ((etag && (strlen(etag) > 2))) {
+ if (etag[0] == '"') {
+ etag = apr_pstrndup(r->pool, etag, strlen(etag) - 2);
+ apr_table_set(r->headers_out, "ETag",
+ apr_pstrcat(r->pool, etag, "-", transform, "\"", NULL));
+ }
+ }
}
static apr_status_t deflate_out_filter(ap_filter_t *f,
apr_bucket_brigade *bb)