protected String parseBodyMethods = "POST";
- protected HashSet parseBodyMethodsSet;
+ protected HashSet<String> parseBodyMethodsSet;
/**
}
- public String getParseBodyMethods()
- {
- return (this.parseBodyMethods);
+ public String getParseBodyMethods() {
+
+ return this.parseBodyMethods;
+
}
- public void setParseBodyMethods(String methods)
- {
- HashSet methodSet = new HashSet();
+ public void setParseBodyMethods(String methods) {
+
+ HashSet<String> methodSet = new HashSet<String>();
- if(null != methods)
+ if( null != methods )
methodSet.addAll(Arrays.asList(methods.split("\\s*,\\s*")));
- if(methodSet.contains("TRACE"))
- throw new IllegalArgumentException("TRACE method MUST NOT include an entity (see RFC 2616 Section 9.6)");
+ if( methodSet.contains("TRACE") )
+ throw new IllegalArgumentException(sm.getString("coyoteConnector.parseBodyMethodNoTrace"));
this.parseBodyMethods = methods;
this.parseBodyMethodsSet = methodSet;
+
}
- public boolean isParseBodyMethod(String method)
- {
+ protected boolean isParseBodyMethod(String method) {
+
return parseBodyMethodsSet.contains(method);
+
}
/**
protocolHandler.setAdapter(adapter);
// Make sure parseBodyMethodsSet has a default
- if(null == parseBodyMethodsSet)
+ if( null == parseBodyMethodsSet )
setParseBodyMethods(getParseBodyMethods());
try {
to POST. This is useful in RESTful applications that want to
support POST-style semantics for PUT requests.
Note that any setting other than <code>POST</code> causes Tomcat
- to behave in a way that violates the servlet specification.
+ to behave in a way that does against the intent of the servlet
+ specification.
The HTTP method TRACE is specifically forbidden here in accordance
with the HTTP specification.
The default is <code>POST</code></p>
to POST. This is useful in RESTful applications that want to
support POST-style semantics for PUT requests.
Note that any setting other than <code>POST</code> causes Tomcat
- to behave in a way that violates the servlet specification.
+ to behave in a way that does against the intent of the servlet
+ specification.
The HTTP method TRACE is specifically forbidden here in accordance
with the HTTP specification.
The default is <code>POST</code></p>