Changes with Apache 2.0.48
+ *) Fix a bug, where mod_deflate sometimes unconditionally compressed the
+ content if the Accept-Encoding header contained only other tokens than
+ "gzip" (such as "deflate"). PR 21523. [Joe Orton, André Malo]
+
*) Avoid an infinite recursion, which occured if the name of an included
config file or directory contained a wildcard character. PR 22194.
[André Malo]
APACHE 2.0 STATUS: -*-text-*-
-Last modified at [$Date: 2003/09/17 10:30:46 $]
+Last modified at [$Date: 2003/09/17 10:39:43 $]
Release:
modules/mappers/mod_rewrite.c: r1.228
+1: nd
- * Fix mod_deflate not to search somewhere in the memory for the "gzip"
- token and to skip token parameters. PR 21523.
- Don't compress if there was *any* non-identity endoding applied before.
- modules/filters/mod_deflate.c: r1.37, r1.38
- +1: nd, striker, trawick, jorton
-
* Fix mod_log_config's %b format to write "-" in case of bytes_sent == 0.
modules/loggers/mod_log_config.c: r1.106
+1: nd, jorton
}
/* Let's see what our current Content-Encoding is.
- * If gzip is present, don't gzip again. (We could, but let's not.)
+ * If it's already encoded, don't compress again.
+ * (We could, but let's not.)
*/
encoding = apr_table_get(r->headers_out, "Content-Encoding");
if (encoding) {
const char *tmp = encoding;
token = ap_get_token(r->pool, &tmp, 0);
- while (token && token[0]) {
- if (!strcasecmp(token, "gzip")) {
+ while (token && *token) {
+ /* stolen from mod_negotiation: */
+ if (strcmp(token, "identity") && strcmp(token, "7bit") &&
+ strcmp(token, "8bit") && strcmp(token, "binary")) {
+
ap_remove_output_filter(f);
return ap_pass_brigade(f->next, bb);
}
+
/* Otherwise, skip token */
- tmp++;
- token = ap_get_token(r->pool, &tmp, 0);
+ if (*tmp) {
+ ++tmp;
+ }
+ token = (*tmp) ? ap_get_token(r->pool, &tmp, 0) : NULL;
}
}
token = ap_get_token(r->pool, &accepts, 0);
while (token && token[0] && strcasecmp(token, "gzip")) {
- /* skip token */
- accepts++;
- token = ap_get_token(r->pool, &accepts, 0);
+ /* skip parameters, XXX: ;q=foo evaluation? */
+ while (*accepts == ';') {
+ ++accepts;
+ token = ap_get_token(r->pool, &accepts, 1);
+ }
+
+ /* retrieve next token */
+ if (*accepts == ',') {
+ ++accepts;
+ }
+ token = (*accepts) ? ap_get_token(r->pool, &accepts, 0) : NULL;
}
/* No acceptable token found. */