----- Original Message -----
From: "Jan Luehe" <[EMAIL PROTECTED]>
To: "Tomcat Developers List" <[EMAIL PROTECTED]>
Sent: Thursday, October 28, 2004 9:45 AM
Subject: Re: cvs commit:
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/connector
CoyoteAdapter.java


> Bill,
>
> Bill Barker wrote:
> > <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> >
> >>luehe       2004/10/27 15:58:17
> >>
> >> +
> >> +    private Method[] getAllDeclaredMethods(Class c) {
> >> +
> >> +        if (c.equals(javax.servlet.http.HttpServlet.class)) {
> >> +            return null;
> >> +        }
> >> +
> >> +        Method[] parentMethods =
> >>getAllDeclaredMethods(c.getSuperclass());
> >
> >
> > If the servlet isn't a HttpServlet (e.g. it's a JSP page) then this will
> > recurse down to j.l.Object, when c.getSuperClass will return 'null', and
you
> > will get an NPE from the 'c.equals' line.
>
> Actually, in the case of a JSP, we're dealing w/ JspServlet, which is an
> instance of HttpServlet.
>
> I've changed the code to return a constant set of methods if the servlet
> is not an instance of HttpServlet, avoiding the NPE. :)
>

My bad.  I should pay more attention to Jasper :).

However, a JSP page still will return 'Allow: OPTIONS' after all of this
work :).

> Thanks,
>
> Jan
>
>
> > IMHO, this patch is an overly complex way to try and determine something
> > that isn't determinable under the servlet spec (again, think JSP page
:).
> > You might as well just set the Allow header to any old constant set of
> > methods.
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>



This message is intended only for the use of the person(s) listed above as the 
intended recipient(s), and may contain information that is PRIVILEGED and 
CONFIDENTIAL.  If you are not an intended recipient, you may not read, copy, or 
distribute this message or any attachment. If you received this communication in 
error, please notify us immediately by e-mail and then delete all copies of this 
message and any attachments.

In addition you should be aware that ordinary (unencrypted) e-mail sent through the 
Internet is not secure. Do not send confidential or sensitive information, such as 
social security numbers, account numbers, personal identification numbers and 
passwords, to us via ordinary (unencrypted) e-mail.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to