SPR-8862 Fix issue with matching negated header values.

This commit is contained in:
Rossen Stoyanchev
2011-11-23 15:23:55 +00:00
parent 6eba6f2059
commit e695a21688
3 changed files with 41 additions and 3 deletions

View File

@@ -127,12 +127,21 @@ abstract class ServletAnnotationMappingUtils {
}
}
if (negated) {
found = !found;
}
if (!found) {
return negated;
return false;
}
}
else if (!value.equals(request.getHeader(key))) {
return negated;
else {
boolean match = value.equals(request.getHeader(key));
if (negated) {
match = !match;
}
if (!match) {
return false;
}
}
}
}