[Httpunit-commit] CVS: httpunit/src/com/meterware/httpunit WebResponse.java,1.110,1.111
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2003-03-07 05:04:36
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv18509/src/com/meterware/httpunit
Modified Files:
WebResponse.java
Log Message:
from Andrew Bickerton: handle writes to frames with non-HTML and with new <base> tags
Index: WebResponse.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebResponse.java,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -r1.110 -r1.111
--- WebResponse.java 23 Feb 2003 20:03:38 -0000 1.110
+++ WebResponse.java 7 Mar 2003 05:03:59 -0000 1.111
@@ -544,6 +544,7 @@
public HTMLPage.Scriptable getDocument() {
try {
+ if (!isHTML()) replaceText( BLANK_HTML, HTML_CONTENT );
return getReceivedPage().getScriptableObject();
} catch (SAXException e) {
throw new RuntimeException( e.toString() );
@@ -736,6 +737,18 @@
_inputStream = null;
_page = null;
_contentType = contentType;
+ _baseURL = null;
+ _baseTarget = null;
+ _refreshHeader = null;
+ _hasSubframes = false;
+
+ try {
+ readTags( text.getBytes() );
+ } catch (UnsupportedEncodingException e) {
+ throw new RuntimeException( "Failure while attempting to reparse text: " + e );
+ } catch (MalformedURLException e) {
+ throw new RuntimeException( "Failure while attempting to reparse text: " + e );
+ }
}
|