httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r574024 - in /httpd/httpd/trunk: CHANGES modules/proxy/ajp_header.c
Date Sun, 09 Sep 2007 16:20:52 GMT
Author: jim
Date: Sun Sep  9 09:20:45 2007
New Revision: 574024

URL: http://svn.apache.org/viewvc?rev=574024&view=rev
Log:
Make AJP HEAD aware

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/proxy/ajp_header.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=574024&r1=574023&r2=574024&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Sun Sep  9 09:20:45 2007
@@ -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]
 

Modified: httpd/httpd/trunk/modules/proxy/ajp_header.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/ajp_header.c?rev=574024&r1=574023&r2=574024&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/ajp_header.c (original)
+++ httpd/httpd/trunk/modules/proxy/ajp_header.c Sun Sep  9 09:20:45 2007
@@ -162,13 +162,19 @@
     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 @@
     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);



Mime
View raw message