You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2007/09/18 15:34:25 UTC

svn commit: r576911 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS modules/proxy/ajp_header.c

Author: jim
Date: Tue Sep 18 06:34:25 2007
New Revision: 576911

URL: http://svn.apache.org/viewvc?rev=576911&view=rev
Log:
Merge r574024 from trunk:

Make AJP HEAD aware

Reviewed by: jim

Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/modules/proxy/ajp_header.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=576911&r1=576910&r2=576911&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Tue Sep 18 06:34:25 2007
@@ -1,6 +1,9 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.7
 
+  *) mod_proxy_ajp: Differentiate within AJP between GET and HEAD
+     requests. PR 43060 [Jim Jagielski]
+
   *) Don't send spurious "100 Continue" response lines.
      PR 38014 [Basant Kumar Kukreja <basant.kukreja sun.com>]
 

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=576911&r1=576910&r2=576911&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Tue Sep 18 06:34:25 2007
@@ -79,13 +79,6 @@
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-    * mod_proxy_ajp: Differentiate within AJP between GET and HEAD requests.
-      PR 43060
-      Trunk version of patch:
-         http://svn.apache.org/viewcvs.cgi?rev=574024&view=rev
-      Backport version for 2.2.x of patch:
-         Trunk version of patch works
-      +1: rpluem, jim, niq
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]

Modified: httpd/httpd/branches/2.2.x/modules/proxy/ajp_header.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/proxy/ajp_header.c?rev=576911&r1=576910&r2=576911&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/proxy/ajp_header.c (original)
+++ httpd/httpd/branches/2.2.x/modules/proxy/ajp_header.c Tue Sep 18 06:34:25 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);