Changes with Apache 2.3.0
[ When backported to 2.2.x, remove entry from this file ]
+ *) mod_proxy: Don't by default violate RFC2616 by setting
+ Max-Forwards when the client didn't send it to us.
+ Leave that as a configuration option.
+ PR 16137 [Nick Kew]
+
*) mod_proxy_http: Remove Warning headers with wrong date
PR 16138 [Nick Kew]
/* set configured max-forwards */
maxfwd = conf->maxfwd;
}
- apr_table_set(r->headers_in, "Max-Forwards",
- apr_psprintf(r->pool, "%ld", (maxfwd > 0) ? maxfwd : 0));
+ if (maxfwd >= 0) {
+ apr_table_set(r->headers_in, "Max-Forwards",
+ apr_psprintf(r->pool, "%ld", maxfwd));
+ }
if (r->method_number == M_TRACE) {
core_server_config *coreconf = (core_server_config *)
proxy_server_conf *psf =
ap_get_module_config(parms->server->module_config, &proxy_module);
long s = atol(arg);
- if (s < 0) {
- return "ProxyMaxForwards must be greater or equal to zero..";
- }
psf->maxfwd = s;
psf->maxfwd_set = 1;
#endif /*APR_CHARSET_EBCDIC*/
/* default Max-Forwards header setting */
-#define DEFAULT_MAX_FORWARDS 10
+/* Set this to -1, which complies with RFC2616 by not setting
+ * max-forwards if the client didn't send it to us.
+ */
+#define DEFAULT_MAX_FORWARDS -1
/* static information about a remote proxy */
struct proxy_remote {