Commit 08cfeb82 authored by Stefan Fritsch's avatar Stefan Fritsch
Browse files

Code cleanup: replace apr_table_set with non-copying apr_table_setn

in a few places

Submitted by: Christophe JAILLET <christophe jaillet wanadoo fr>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137413 13f79535-47bb-0310-9956-ffa450edef68
parent 077d1a42
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -273,7 +273,7 @@ static int status_handler(request_rec *r)
                    if (*(loc + len ) == '=') {
                        t = atol(loc + len + 1);
                    }
                    apr_table_set(r->headers_out,
                    apr_table_setn(r->headers_out,
                                   status_options[i].hdr_out_str,
                                   apr_ltoa(r->pool, t < 1 ? 10 : t));
                    break;
+1 −1
Original line number Diff line number Diff line
@@ -809,7 +809,7 @@ static int proxy_needsdomain(request_rec *r, const char *url, const char *domain
                           &r->parsed_uri,
                           APR_URI_UNP_REVEALPASSWORD);

    apr_table_set(r->headers_out, "Location", nuri);
    apr_table_setn(r->headers_out, "Location", nuri);
    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
                  "Domain missing: %s sent to %s%s%s", r->uri,
                  apr_uri_unparse(r->pool, &r->parsed_uri,
+2 −2
Original line number Diff line number Diff line
@@ -321,8 +321,8 @@ static int session_identity_encode(request_rec * r, session_rec * z)
    char *buffer = NULL;
    int length = 0;
    if (z->expiry) {
        char *expiry = apr_psprintf(r->pool, "%" APR_INT64_T_FMT, z->expiry);
        apr_table_set(z->entries, SESSION_EXPIRY, expiry);
        char *expiry = apr_psprintf(z->pool, "%" APR_INT64_T_FMT, z->expiry);
        apr_table_setn(z->entries, SESSION_EXPIRY, expiry);
    }
    apr_table_do((int (*) (void *, const char *, const char *))
                 identity_count, &length, z->entries, NULL);;