2012/10/6 Mark Thomas <ma...@apache.org>: > > Konstantin Kolinko <knst.koli...@gmail.com> wrote: > >>2012/10/5 Christopher Schultz <ch...@christopherschultz.net>: > >>> RFCs 2616, 2068, and 1945 all agree that method name is >>case-sensitive: >>> http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.1 >>> >> >>OK. Agreed. >> >>Looking at Servlet spec 2.5, SRV.3.1.1 says "The HTTP method is POST". >> >> >>I tested 6.0.35 using telnet as a client. >>The result is that it sometimes allow lowercase methods (or maybe it >>does not care about a method in that case) but generally it responds >>with an error. >> >>get /index.jsp HTTP/1.0 >>post /index.jsp HTTP/1.0 >>- result in the welcome page being rendered > > The JSP servlet responds to any and every method. Personally, I think that is > wrong. On my todo list for Tomcat 8 (not yet documented because I was hoping > for some guidance form the JSP EG first) is to limit JSPs to responding to > GET, POST, TRACE (blocked at the connector anyway) HEAD and OPTIONS and a > servlet init parameter to enable more methods. I was also planning on > providing similar functionality to that in HttpServlet. >
Thinking more about the JSPs, JSPs are often used as views in an MVC pattern, being called from a controller servet using forward or include. Forwards and includes do not change the method name. In this scenario it is good that JSPs can render the response regardless of the HTTP methods supported by the controller servet. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org