]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Make AJP HEAD aware
authorJim Jagielski <jim@apache.org>
Sun, 9 Sep 2007 16:20:45 +0000 (16:20 +0000)
committerJim Jagielski <jim@apache.org>
Sun, 9 Sep 2007 16:20:45 +0000 (16:20 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@574024 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/proxy/ajp_header.c

diff --git a/CHANGES b/CHANGES
index e401fb2539e264a782c1f04a374a30583b08bc9c..a926b184055b801bfd503f3514c9c98053788469 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 Changes with Apache 2.3.0
 [ When backported to 2.2.x, remove entry from this file ]
 
+  *) mod_proxy_ajp: Differentiate within AJP between GET and HEAD
+     requests. PR 43060 [Jim Jagielski]
+
   *) mod_proxy_http: Propagate Proxy-Authorization header correctly.
      PR 25947 [Nick Kew]
 
index ceac0f0368c06533387147d178c848c394f34caf..01115f64d84f96e57836e224866d5a34c243c310 100644 (file)
@@ -162,13 +162,19 @@ static const unsigned char sc_for_req_method_table[] = {
     0                       /* M_INVALID */
 };
 
-static int sc_for_req_method_by_id(int method_id)
+static int sc_for_req_method_by_id(request_rec *r)
 {
-    if (method_id < 0 || method_id > M_INVALID)
+    int method_id = r->method_number;
+    if (method_id < 0 || method_id > M_INVALID) {
         return UNKNOWN_METHOD;
-    else
+    }
+    else if (r->header_only) {
+        return SC_M_HEAD;
+    }
+    else {
         return sc_for_req_method_table[method_id] ?
                sc_for_req_method_table[method_id] : UNKNOWN_METHOD;
+    }
 }
 
 /*
@@ -218,7 +224,7 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
                          "Into ajp_marshal_into_msgb");
 
-    if ((method = sc_for_req_method_by_id(r->method_number)) == UNKNOWN_METHOD) {
+    if ((method = sc_for_req_method_by_id(r)) == UNKNOWN_METHOD) {
         ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
                "ajp_marshal_into_msgb - No such method %s",
                r->method);