tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@locus.apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/core HttpServletResponseFacade.java LocalStrings.properties LocalStrings_es.properties
Date Sat, 08 Apr 2000 00:02:20 GMT
craigmcc    00/04/07 17:02:20

  Modified:    src/share/org/apache/tomcat/core
                        HttpServletResponseFacade.java
                        LocalStrings.properties LocalStrings_es.properties
  Log:
  Spec compliance patch.  HttpServletResponse.sendError() -- and therefore
  the other methods that call it internally like sendRedirect() are required
  to throw IllegalStateException if the response has already been committed,
  or reset() the response buffer if it has not.
  PR:188
  Submitted by:	Jason Hunter <jhunter@acm.org>
  
  Revision  Changes    Path
  1.9       +7 -3      jakarta-tomcat/src/share/org/apache/tomcat/core/HttpServletResponseFacade.java
  
  Index: HttpServletResponseFacade.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/HttpServletResponseFacade.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- HttpServletResponseFacade.java	2000/04/06 00:00:14	1.8
  +++ HttpServletResponseFacade.java	2000/04/08 00:02:18	1.9
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/HttpServletResponseFacade.java,v
1.8 2000/04/06 00:00:14 craigmcc Exp $
  - * $Revision: 1.8 $
  - * $Date: 2000/04/06 00:00:14 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/HttpServletResponseFacade.java,v
1.9 2000/04/08 00:02:18 craigmcc Exp $
  + * $Revision: 1.9 $
  + * $Date: 2000/04/08 00:02:18 $
    *
    * ====================================================================
    *
  @@ -153,6 +153,10 @@
       }
       
       public void sendError(int sc, String msg) throws IOException {
  +	if (isCommitted())
  +	    throw new IllegalStateException(sm.getString("hsrf.error.ise"));
  +	else
  +	    reset();
   	setStatus( sc );
   	Request request=response.getRequest();
   	request.setAttribute("javax.servlet.error.message", msg);
  
  
  
  1.8       +3 -2      jakarta-tomcat/src/share/org/apache/tomcat/core/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/LocalStrings.properties,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- LocalStrings.properties	2000/01/12 19:54:01	1.7
  +++ LocalStrings.properties	2000/04/08 00:02:18	1.8
  @@ -1,4 +1,4 @@
  -# $Id: LocalStrings.properties,v 1.7 2000/01/12 19:54:01 costin Exp $
  +# $Id: LocalStrings.properties,v 1.8 2000/04/08 00:02:18 craigmcc Exp $
   #
   
   # Localized strings for package org.apache.tomcat.core
  @@ -37,10 +37,11 @@
   hsrf.encodeRedirect.iae=urls must be absolute
   hsrf.redirect.iae=specified url redirect is null
   hsrf.dispatcher.iae=Request dispatcher paths can't be null: {0}
  +hsrf.error.ise=Response has already been committed
   
   rdi.forward.ise=Cannot forward as OutputStream or Writer has already been obtained
   
  -serverReponse.outputStream.ise=getWriter() has already been called
  +serverResponse.outputStream.ise=getWriter() has already been called
   serverResponse.ise.writer.ise=getOutputStream() has already been called
   
   serverRequest.inputStream.npe=input stream is null
  
  
  
  1.2       +2 -2      jakarta-tomcat/src/share/org/apache/tomcat/core/LocalStrings_es.properties
  
  Index: LocalStrings_es.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/LocalStrings_es.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LocalStrings_es.properties	2000/04/04 00:56:55	1.1
  +++ LocalStrings_es.properties	2000/04/08 00:02:18	1.2
  @@ -1,4 +1,4 @@
  -# $Id: LocalStrings_es.properties,v 1.1 2000/04/04 00:56:55 nacho Exp $
  +# $Id: LocalStrings_es.properties,v 1.2 2000/04/08 00:02:18 craigmcc Exp $
   #
   
   # Localized strings for package org.apache.tomcat.core
  @@ -40,7 +40,7 @@
   
   rdi.forward.ise=No puedo reenviar como OutputStream o el  Writer ha sido ya obtenido
   
  -serverReponse.outputStream.ise=getWriter() ha sido ya llamado
  +serverResponse.outputStream.ise=getWriter() ha sido ya llamado
   serverResponse.ise.writer.ise=getOutputStream() ha sido ya llamado
   
   serverRequest.inputStream.npe=input stream es nulo
  
  
  

Mime
View raw message