]> granicus.if.org Git - apache/commitdiff
Code cleanup: replace apr_table_set with non-copying apr_table_setn
authorStefan Fritsch <sf@apache.org>
Sun, 19 Jun 2011 18:50:12 +0000 (18:50 +0000)
committerStefan Fritsch <sf@apache.org>
Sun, 19 Jun 2011 18:50:12 +0000 (18:50 +0000)
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

modules/generators/mod_status.c
modules/proxy/mod_proxy.c
modules/session/mod_session.c

index 5d1034f5f0877fe94d73553d98a4922b55ecffef..3c799dc98b5b78f44b416c5d82a79592dddbab4e 100644 (file)
@@ -273,9 +273,9 @@ static int status_handler(request_rec *r)
                     if (*(loc + len ) == '=') {
                         t = atol(loc + len + 1);
                     }
-                    apr_table_set(r->headers_out,
-                                  status_options[i].hdr_out_str,
-                                  apr_ltoa(r->pool, t < 1 ? 10 : t));
+                    apr_table_setn(r->headers_out,
+                                   status_options[i].hdr_out_str,
+                                   apr_ltoa(r->pool, t < 1 ? 10 : t));
                     break;
                 }
                 case STAT_OPT_NOTABLE:
index 29802dc12923fed28824441fbab9844087555fb0..d6ea2b73f8f05087d01936626fe3c21153aa86a2 100644 (file)
@@ -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,
index a81c552154c6fdb2e34a1a4ba0ea259115c11aa8..09ef7cbc858ef6d75ba462e428f71d697951b1ff 100644 (file)
@@ -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);;