I noticed the following code at line 712 of http.c in 2.0.4:
no_cont = !(strncasecmp(request + matches[1].rm_so, "LOCK",
matches[1].rm_eo - matches[1].rm_so)
|| strncasecmp(request + matches[1].rm_so,
"UNLOCK", matches[1].rm_eo - matches[1].rm_so)
|| strncasecmp(request + matches[1].rm_so,
"DELETE", matches[1].rm_eo - matches[1].rm_so)
|| strncasecmp(request + matches[1].rm_so,
"OPTIONS", matches[1].rm_eo - matches[1].rm_so));
I think the logic is wrong here. The strncasecmp's can't all match
(unless the regexp matches a zero-length string - which it does not) so
at least three of the four will return non-zero. So no_cont will always
be zero. To fix, move the "!" inside the parentheses before each
strncasecmp, or use "&&" instead of "||".
Next thought: If webdav works despite this bug (I have not tried), is
this code needed at all?
[...]
|