mjc 96/06/03 05:04:21
Modified: src alloc.c util_script.c Log: Submitted by: Paul Sutton <[EMAIL PROTECTED]> The HTTP specification says that it is legal to merge duplicate headers into one. Some browsers that support Cookies don't like merged headers and prefer that each Set-Cookie header is sent separately. Lets humour those browsers for now. Revision Changes Path 1.5 +9 -0 apache/src/alloc.c Index: alloc.c =================================================================== RCS file: /export/home/cvs/apache/src/alloc.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C3 -r1.4 -r1.5 *** alloc.c 1996/05/27 19:48:37 1.4 --- alloc.c 1996/06/03 12:04:19 1.5 *************** *** 624,629 **** --- 624,638 ---- elts->val = pstrdup (t->pool, val); } + void table_add (table *t, char *key, char *val) + { + table_entry *elts = (table_entry *)t->elts; + + elts = (table_entry *)push_array(t); + elts->key = pstrdup (t->pool, key); + elts->val = pstrdup (t->pool, val); + } + table* overlay_tables (pool *p, table *overlay, table *base) { return append_arrays (p, overlay, base); 1.12 +9 -0 apache/src/util_script.c Index: util_script.c =================================================================== RCS file: /export/home/cvs/apache/src/util_script.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C3 -r1.11 -r1.12 *** util_script.c 1996/04/15 11:28:02 1.11 --- util_script.c 1996/06/03 12:04:20 1.12 *************** *** 302,307 **** --- 302,316 ---- else if(!strcasecmp(w,"Location")) { table_set (r->headers_out, w, l); } + + /* The HTTP specification says that it is legal to merge duplicate + * headers into one. Some browsers that support Cookies don't like + * merged headers and prefer that each Set-Cookie header is sent + * separately. Lets humour those browsers. + */ + else if(!strcasecmp(w, "Set-Cookie")) { + table_add(r->err_headers_out, w, l); + } else { table_merge (r->err_headers_out, w, l); }