]> granicus.if.org Git - apache/blobdiff - modules/proxy/ajp_header.c
hostname: Test and log useragent_host per-request across various modules,
[apache] / modules / proxy / ajp_header.c
index 0ec94ad7806ad5a6f1d59110f0212930bdb6d931..4f94f7b684788a4c4daeb08d701c8460941fd24a 100644 (file)
@@ -239,7 +239,7 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
         num_headers = t->nelts;
     }
 
-    remote_host = (char *)ap_get_remote_host(r->connection, r->per_dir_config, REMOTE_HOST, NULL);
+    remote_host = (char *)ap_get_useragent_host(r, REMOTE_HOST, NULL);
 
     ajp_msg_reset(msg);
 
@@ -297,7 +297,7 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
     if (s->secret) {
         if (ajp_msg_append_uint8(msg, SC_A_SECRET) ||
             ajp_msg_append_string(msg, s->secret)) {
-            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(03228)
                    "Error ajp_marshal_into_msgb - "
                    "Error appending secret");
             return APR_EGENERAL;
@@ -633,15 +633,15 @@ static apr_status_t ajp_unmarshal_response(ajp_msg_t *msg,
         }
 
         /* Set-Cookie need additional processing */
-        if (!strcasecmp(stringname, "Set-Cookie")) {
+        if (!ap_casecmpstr(stringname, "Set-Cookie")) {
             value = ap_proxy_cookie_reverse_map(r, dconf, value);
         }
         /* Location, Content-Location, URI and Destination need additional
          * processing */
-        else if (!strcasecmp(stringname, "Location")
-                 || !strcasecmp(stringname, "Content-Location")
-                 || !strcasecmp(stringname, "URI")
-                 || !strcasecmp(stringname, "Destination"))
+        else if (!ap_casecmpstr(stringname, "Location")
+                 || !ap_casecmpstr(stringname, "Content-Location")
+                 || !ap_casecmpstr(stringname, "URI")
+                 || !ap_casecmpstr(stringname, "Destination"))
         {
           value = ap_proxy_location_reverse_map(r, dconf, value);
         }
@@ -654,7 +654,7 @@ static apr_status_t ajp_unmarshal_response(ajp_msg_t *msg,
         apr_table_add(r->headers_out, stringname, value);
 
         /* Content-type needs an additional handling */
-        if (strcasecmp(stringname, "Content-Type") == 0) {
+        if (ap_casecmpstr(stringname, "Content-Type") == 0) {
              /* add corresponding filter */
             ap_set_content_type(r, apr_pstrdup(r->pool, value));
             ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r,