HTTP method should be case sensitive (RFC-2616 Sec. 5.1.1)

This commit is contained in:
Jeff Pinner 2012-11-01 22:52:23 -07:00
parent a9814fbf93
commit be6ddb74aa

View File

@ -109,7 +109,7 @@ public class HttpMethod implements Comparable<HttpMethod> {
throw new NullPointerException("name");
}
name = name.trim().toUpperCase();
name = name.trim();
if (name.length() == 0) {
throw new IllegalArgumentException("empty name");
}
@ -136,7 +136,7 @@ public class HttpMethod implements Comparable<HttpMethod> {
throw new NullPointerException("name");
}
name = name.trim().toUpperCase();
name = name.trim();
if (name.length() == 0) {
throw new IllegalArgumentException("empty name");
}