Changes with Apache 2.0.34-dev
+ *) Change the header merging behaviour in proxy, as some headers
+ (like Set-Cookie) cannot be unmerged due to stray commas in
+ dates. [Graham Leggett]
+
*) Be more vocal about what AcceptMutex values we allow, to make
us closer to how 1.3 does it. [Jim Jagielski]
ap_get_module_config(parms->server->module_config, &proxy_module);
long s = atol(arg);
- psf->io_buffer_size = MAX(s, AP_IOBUFSIZE);
+ psf->io_buffer_size = ((s > AP_IOBUFSIZE) ? s : AP_IOBUFSIZE);
psf->io_buffer_size_set = 1;
return NULL;
}
}
}
- /* cookies are special: they must not be merged (stupid browsers) */
- ap_proxy_table_unmerge(r->pool, r->headers_out, "Set-Cookie");
- ap_proxy_table_unmerge(r->pool, r->headers_out, "Set-Cookie2");
-
r->sent_bodyct = 1;
/* Is it an HTTP/0.9 response? If so, send the extra data */
if (backasswards) {
* Reads headers from a buffer and returns an array of headers.
* Returns NULL on file error
* This routine tries to deal with too long lines and continuation lines.
- * @@@: XXX: FIXME: currently the headers are passed thru un-merged.
- * Is that okay, or should they be collapsed where possible?
+ *
+ * Note: Currently the headers are passed through unmerged. This has to be
+ * done so that headers which react badly to merging (such as Set-Cookie
+ * headers, which contain commas within the date field) do not get stuffed
+ * up.
*/
PROXY_DECLARE(apr_table_t *)ap_proxy_read_headers(request_rec *r, request_rec *rr, char *buffer, int size, conn_rec *c)
{
for (end = &value[strlen(value)-1]; end > value && apr_isspace(*end); --end)
*end = '\0';
- /* make sure we merge so as not to destroy duplicated headers */
- apr_table_merge(headers_out, buffer, value);
+ /* make sure we add so as not to destroy duplicated headers */
+ apr_table_add(headers_out, buffer, value);
/* the header was too long; at the least we should skip extra data */
if (len >= size - 1) {