j***@apache.org
2014-10-16 21:42:46 UTC
Author: jailletc36
Date: Thu Oct 16 21:42:45 2014
New Revision: 1632440
URL: http://svn.apache.org/r1632440
Log:
Merge 1610813 from trunk:
http_protocol: fix logic in ap_method_list_(add|remove) in order:
- to correctly reset bits
- not to modify the 'method_mask' bitfield unnecessarily
Submitted by: jailletc36
Reviewed by: jailletc36, ylavic, rjung
Backported by: jailletc36
Modified:
httpd/httpd/branches/2.4.x/CHANGES
httpd/httpd/branches/2.4.x/STATUS
httpd/httpd/branches/2.4.x/modules/http/http_protocol.c
Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1632440&r1=1632439&r2=1632440&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Thu Oct 16 21:42:45 2014
@@ -13,6 +13,11 @@ Changes with Apache 2.4.11
request headers earlier. Adds "MergeTrailers" directive to restore
legacy behavior. [Edward Lu, Yann Ylavic, Joe Orton, Eric Covener]
+ *) http_protocol: fix logic in ap_method_list_(add|remove) in order:
+ - to correctly reset bits
+ - not to modify the 'method_mask' bitfield unnecessarily
+ [Christophe Jaillet]
+
*) mod_slotmem_shm: Increase log level for some originally debug messages.
[Jim Jagielski]
Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1632440&r1=1632439&r2=1632440&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Thu Oct 16 21:42:45 2014
@@ -108,13 +108,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
2.4.x patch: trunk works
+1: jkaluza, ylavic, rjung
- * http_protocol: fix logic in ap_method_list_(add|remove) in order:
- - to correctly reset bits
- - not to modify the 'method_mask' bitfield unnecessarily
- trunk patch: http://svn.apache.org/r1610813
- 2.4.x patch: trunk patch works (modulo CHANGES)
- +1: jailletc36, ylavic, rjung
-
* mod_proxy_http: Avoid (unlikely) access to freed memory.
trunk patch: http://svn.apache.org/r1599486
2.4.x patch: trunk works
Modified: httpd/httpd/branches/2.4.x/modules/http/http_protocol.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/http/http_protocol.c?rev=1632440&r1=1632439&r2=1632440&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/http/http_protocol.c (original)
+++ httpd/httpd/branches/2.4.x/modules/http/http_protocol.c Thu Oct 16 21:42:45 2014
@@ -1608,8 +1608,8 @@ AP_DECLARE(void) ap_method_list_add(ap_m
* bitmask.
*/
methnum = ap_method_number_of(method);
- l->method_mask |= (AP_METHOD_BIT << methnum);
if (methnum != M_INVALID) {
+ l->method_mask |= (AP_METHOD_BIT << methnum);
return;
}
/*
@@ -1641,15 +1641,15 @@ AP_DECLARE(void) ap_method_list_remove(a
* by a module, use the bitmask.
*/
methnum = ap_method_number_of(method);
- l->method_mask |= ~(AP_METHOD_BIT << methnum);
if (methnum != M_INVALID) {
+ l->method_mask &= ~(AP_METHOD_BIT << methnum);
return;
}
/*
* Otherwise, see if the method name is in the array of string names.
*/
if (l->method_list->nelts != 0) {
- register int i, j, k;
+ int i, j, k;
methods = (char **)l->method_list->elts;
for (i = 0; i < l->method_list->nelts; ) {
if (strcmp(method, methods[i]) == 0) {
Date: Thu Oct 16 21:42:45 2014
New Revision: 1632440
URL: http://svn.apache.org/r1632440
Log:
Merge 1610813 from trunk:
http_protocol: fix logic in ap_method_list_(add|remove) in order:
- to correctly reset bits
- not to modify the 'method_mask' bitfield unnecessarily
Submitted by: jailletc36
Reviewed by: jailletc36, ylavic, rjung
Backported by: jailletc36
Modified:
httpd/httpd/branches/2.4.x/CHANGES
httpd/httpd/branches/2.4.x/STATUS
httpd/httpd/branches/2.4.x/modules/http/http_protocol.c
Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1632440&r1=1632439&r2=1632440&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Thu Oct 16 21:42:45 2014
@@ -13,6 +13,11 @@ Changes with Apache 2.4.11
request headers earlier. Adds "MergeTrailers" directive to restore
legacy behavior. [Edward Lu, Yann Ylavic, Joe Orton, Eric Covener]
+ *) http_protocol: fix logic in ap_method_list_(add|remove) in order:
+ - to correctly reset bits
+ - not to modify the 'method_mask' bitfield unnecessarily
+ [Christophe Jaillet]
+
*) mod_slotmem_shm: Increase log level for some originally debug messages.
[Jim Jagielski]
Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1632440&r1=1632439&r2=1632440&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Thu Oct 16 21:42:45 2014
@@ -108,13 +108,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
2.4.x patch: trunk works
+1: jkaluza, ylavic, rjung
- * http_protocol: fix logic in ap_method_list_(add|remove) in order:
- - to correctly reset bits
- - not to modify the 'method_mask' bitfield unnecessarily
- trunk patch: http://svn.apache.org/r1610813
- 2.4.x patch: trunk patch works (modulo CHANGES)
- +1: jailletc36, ylavic, rjung
-
* mod_proxy_http: Avoid (unlikely) access to freed memory.
trunk patch: http://svn.apache.org/r1599486
2.4.x patch: trunk works
Modified: httpd/httpd/branches/2.4.x/modules/http/http_protocol.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/http/http_protocol.c?rev=1632440&r1=1632439&r2=1632440&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/http/http_protocol.c (original)
+++ httpd/httpd/branches/2.4.x/modules/http/http_protocol.c Thu Oct 16 21:42:45 2014
@@ -1608,8 +1608,8 @@ AP_DECLARE(void) ap_method_list_add(ap_m
* bitmask.
*/
methnum = ap_method_number_of(method);
- l->method_mask |= (AP_METHOD_BIT << methnum);
if (methnum != M_INVALID) {
+ l->method_mask |= (AP_METHOD_BIT << methnum);
return;
}
/*
@@ -1641,15 +1641,15 @@ AP_DECLARE(void) ap_method_list_remove(a
* by a module, use the bitmask.
*/
methnum = ap_method_number_of(method);
- l->method_mask |= ~(AP_METHOD_BIT << methnum);
if (methnum != M_INVALID) {
+ l->method_mask &= ~(AP_METHOD_BIT << methnum);
return;
}
/*
* Otherwise, see if the method name is in the array of string names.
*/
if (l->method_list->nelts != 0) {
- register int i, j, k;
+ int i, j, k;
methods = (char **)l->method_list->elts;
for (i = 0; i < l->method_list->nelts; ) {
if (strcmp(method, methods[i]) == 0) {