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
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@
1632440 13f79535-47bb-0310-9956-
ffa450edef68
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]
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
* 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;
}
/*
* 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) {