[Httpunit-commit] CVS: httpunit/src/com/meterware/servletunit InvocationContext.java,1.4,1.5 Invocat
Brought to you by:
russgold
From: Russell G. <rus...@us...> - 2002-03-06 04:59:55
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/servletunit In directory usw-pr-cvs1:/tmp/cvs-serv9204/src/com/meterware/servletunit Modified Files: InvocationContext.java InvocationContextImpl.java ServletUnitWebResponse.java Log Message: Added support for gzip-encoded responses Index: InvocationContext.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/servletunit/InvocationContext.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- InvocationContext.java 30 Nov 2001 15:27:35 -0000 1.4 +++ InvocationContext.java 6 Mar 2002 04:59:52 -0000 1.5 @@ -3,7 +3,7 @@ /******************************************************************************************************************** * $Id$ * - * Copyright (c) 2001, Russell Gold + * Copyright (c) 2001-2002, Russell Gold * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation @@ -26,9 +26,11 @@ import javax.servlet.http.HttpServletResponse; import javax.servlet.Servlet; import javax.servlet.ServletException; +import java.io.IOException; /** + * An interface which represents the invocation of a servlet. * * @author <a href="mailto:rus...@ac...">Russell Gold</a> **/ @@ -58,7 +60,7 @@ * Returns the final response from the servlet. Note that this method should * only be invoked after all processing has been done to the servlet response. **/ - WebResponse getServletResponse(); + WebResponse getServletResponse() throws IOException; /** Index: InvocationContextImpl.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/servletunit/InvocationContextImpl.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- InvocationContextImpl.java 4 Feb 2002 22:33:55 -0000 1.3 +++ InvocationContextImpl.java 6 Mar 2002 04:59:52 -0000 1.4 @@ -87,7 +87,7 @@ * Returns the final response from the servlet. Note that this method should * only be invoked after all processing has been done to the servlet response. **/ - public WebResponse getServletResponse() { + public WebResponse getServletResponse() throws IOException { if (_webResponse == null) { HttpSession session = _request.getSession( /* create */ false ); if (session != null && session.isNew()) { Index: ServletUnitWebResponse.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/servletunit/ServletUnitWebResponse.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ServletUnitWebResponse.java 6 Mar 2002 03:45:57 -0000 1.8 +++ ServletUnitWebResponse.java 6 Mar 2002 04:59:52 -0000 1.9 @@ -4,12 +4,12 @@ * * Copyright (c) 2000-2001, Russell Gold * -* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -* documentation files (the "Software"), to deal in the Software without restriction, including without limitation +* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +* documentation files (the "Software"), to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and * to permit persons to whom the Software is furnished to do so, subject to the following conditions: * -* The above copyright notice and this permission notice shall be included in all copies or substantial portions +* The above copyright notice and this permission notice shall be included in all copies or substantial portions * of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO @@ -38,7 +38,7 @@ import javax.servlet.http.HttpServletResponse; import com.meterware.httpunit.*; - + /** * A response from to a request from the simulated servlet environment. @@ -52,7 +52,7 @@ * @param url the url from which the response was received * @param response the response populated by the servlet **/ - ServletUnitWebResponse( String target, URL url, HttpServletResponse response ) { + ServletUnitWebResponse( String target, URL url, HttpServletResponse response ) throws IOException { super( target, url ); _response = (ServletUnitHttpResponse) response; defineRawInputStream( new ByteArrayInputStream( _response.getContents() ) ); @@ -97,8 +97,8 @@ public String toString() { return "[ _response = " + _response + "]"; } - - + + //-------------------------------------------- private members ------------------------------------------------ |