W3C home > Mailing lists > Public > www-tag@w3.org > February 2003

Re: Proposed issue: site metadata hook (slight variation)

From: Miles Sabin <miles@milessabin.com>
Date: Wed, 12 Feb 2003 15:07:56 +0000
To: www-tag@w3.org
Message-Id: <200302121507.56075.miles@milessabin.com>

Julian Reschke wrote,
> > You've misread the Servlet spec. It _allows_ Servlet
> > implementations to support arbitrary extension HTTP methods, but it
> > doesn't _require_ them to provide support.
>
> The HttpServletRequest object has "getMethod()", wich "returns the
> method with which the request was made". I can't see how this is
> optional. Could you explain that?

It returns the requst method _if_ the request has been accepted by the 
servlet container and passed through to a servlet. There's nothing in 
the spec that requires servlet container to behave that way for 
arbitrary extension methods. A servlet container which responded with a 
501 Unimplemented would be completely within it's rights.

> Anyway, Tomcat (the reference impl) and all other servlet engines
> I've tested actually behave this way.

Sure, and Tomcat also provides WebDAV support. That's great, but it's 
not required by the servlet spec either.

> Yes, it allows. The servlet API gives you all the control you need
> (by implementing the "service(request, response)" method).

Yes, you can implement a service() method to handle arbitrary methods, 
but there's no guarantee that your servlet will ever see them.

Cheers,


Miles
Received on Wednesday, 12 February 2003 10:08:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:47:16 GMT