0 Replies Latest reply on Nov 9, 2005 2:16 PM by Steven Brownlee

    Header returns 'status=404' on redirection

    Steven Brownlee Newbie

      I'm wonder if this is by design and/or if it is possible to reconfigure this behavior. Perhaps writing a filter to rewrite the header?

      I have the RequestDumper turned on and discovered that the header returns 'status=404' in the header even though we have configured error page handlers (which are valid files).

      <!-- ============== Error Page Redirection Templates =============== -->
       <error-page>
       <error-code>403;14</error-code>
       <location>/index.cfm?site=lost</location>
       </error-page>
       <error-page>
       <error-code>404</error-code>
       <location>/index.cfm?site=lost</location>
       </error-page>


      I can see the redirection happening in the log file. Here's the truncated request.

      RequestDumperValve[localhost]: REQUEST URI =/twicpm
      RequestDumperValve[localhost]: authType=null
      RequestDumperValve[localhost]: characterEncoding=null
      RequestDumperValve[localhost]: contentLength=-1
      RequestDumperValve[localhost]: contentType=null
      RequestDumperValve[localhost]: contextPath=
      


      Then the handler redirects:

      org.apache.catalina.core.StandardHostValve@9af0b1: Exception Processing ErrorPage[errorCode=404, location=/index.cfm?site=lost]
      ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error
       at org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:331)
       at org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:297)
      


      Then an enormous header is returned (truncated below) with a status of 404, even though we redirected to a valid, existing file.

      RequestDumperValve[localhost]: ---------------------------------------------------------------
      RequestDumperValve[localhost]: authType=null
      RequestDumperValve[localhost]: contentLength=-1
      RequestDumperValve[localhost]: contentType=text/html;charset=iso-8859-1
      ..
      ..
      ..
      RequestDumperValve[localhost]: header=Transfer-Encoding=chunked
      RequestDumperValve[localhost]: header=Date=Wed, 09 Nov 2005 15:10:05 GMT
      RequestDumperValve[localhost]: header=Server=Apache-Coyote/1.1
      RequestDumperValve[localhost]: message=/twicpm
      RequestDumperValve[localhost]: remoteUser=null
      RequestDumperValve[localhost]: status=404
      RequestDumperValve[localhost]: ===============================================================