View | Details | Raw Unified | Return to bug 25543
Collapse All | Expand All

(-)modules/proxy/ajp_header.c (-1 / +20 lines)
Lines 432-437 Link Here
432
    return APR_SUCCESS;
432
    return APR_SUCCESS;
433
}
433
}
434
434
435
static int copy_header(void *v, const char *key, const char *val)
436
{
437
    apr_table_addn(v, key, val);
438
    return 1;
439
}
440
435
/*
441
/*
436
AJPV13_RESPONSE/AJPV14_RESPONSE:=
442
AJPV13_RESPONSE/AJPV14_RESPONSE:=
437
    response_prefix (2)
443
    response_prefix (2)
Lines 493-499 Link Here
493
499
494
    rc = ajp_msg_get_uint16(msg, &num_headers);
500
    rc = ajp_msg_get_uint16(msg, &num_headers);
495
    if (rc == APR_SUCCESS) {
501
    if (rc == APR_SUCCESS) {
496
        r->headers_out = apr_table_make(r->pool, num_headers);
502
        apr_table_t *save;
503
504
        /*
505
         * Prior to reseting r->headers_out save possible Set-Cookie
506
         * headers set by other modules like mod_usertrack.
507
         */
508
        if (apr_table_get(r->headers_out, "Set-Cookie")) {
509
            save = apr_table_make(r->pool, num_headers + 2);
510
            apr_table_do(copy_header, save, r->headers_out, "Set-Cookie", NULL);
511
        }
512
        else {
513
            save = apr_table_make(r->pool, num_headers);
514
        }
515
        r->headers_out = save;
497
    } else {
516
    } else {
498
        r->headers_out = NULL;
517
        r->headers_out = NULL;
499
        num_headers = 0;
518
        num_headers = 0;

Return to bug 25543