[EMAIL PROTECTED] wrote:

luehe 2003/07/21 12:06:35

Modified: jasper2/src/share/org/apache/jasper/servlet JspServlet.java
Log:
Added support for X-Powered-By response header, as defined by the
Servlet 2.4 and JSP 2.0 specs.
The Servlet 2.4 spec defines a special
X-Powered-By: Servlet/2.4
header, which containers may add to servlet-generated responses. This
is complemented by the JSP 2.0 spec, which defines a
X-Powered-By: JSP/2.0
header to be added (on an optional basis) to responses utilizing JSP
technology.
The goal of these headers is to aid in gathering statistical data
about the use of Servlet and JSP technology


  +
  +         /*
  +          * Add X-Powered-By header for JSP, if Catalina already added a
  +          * corresponding header for servlets
  +          */
  +         if (response.containsHeader("X-Powered-By")) {
  +             response.addHeader("X-Powered-By", "JSP/2.0");
  +         }
  +

This is a pretty bad implementation IMO. What's the use of disabling this feature ?

-1 on the various flags and checks (just add the headers, without flags and complexity). -0 if you can indicate a good reason for this.
Also, you shouldn't add the JSP 2.0 header in JspServlet. If you precompile, it's not called. Put it in HttpJspBase.


Remy



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



Reply via email to