[Httpunit-commit] CVS: httpunit/src/com/meterware/httpunit HttpWebResponse.java,1.27,1.28 ParsedHTML
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2002-10-22 22:59:29
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory usw-pr-cvs1:/tmp/cvs-serv12991/src/com/meterware/httpunit
Modified Files:
HttpWebResponse.java ParsedHTML.java
Log Message:
Corrected logic of response status workaround logic
Index: HttpWebResponse.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/HttpWebResponse.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- HttpWebResponse.java 22 Oct 2002 15:12:54 -0000 1.27
+++ HttpWebResponse.java 22 Oct 2002 22:59:25 -0000 1.28
@@ -133,7 +133,7 @@
private void readResponseHeader( HttpURLConnection connection ) throws IOException {
- if (needStatusWorkaround()) {
+ if (!needStatusWorkaround()) {
_responseCode = connection.getResponseCode();
_responseMessage = connection.getResponseMessage();
} else {
Index: ParsedHTML.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/ParsedHTML.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- ParsedHTML.java 14 Oct 2002 04:19:06 -0000 1.31
+++ ParsedHTML.java 22 Oct 2002 22:59:25 -0000 1.32
@@ -19,21 +19,30 @@
* DEALINGS IN THE SOFTWARE.
*
*******************************************************************************************************************/
-import java.net.URL;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
-import java.util.Vector;
+import java.net.URL;
import java.util.ArrayList;
-import org.w3c.dom.*;
-
/**
* @author <a href="mailto:rus...@ht...">Russell Gold</a>
* @author <a href="mailto:bx...@bi...">Benoit Xhenseval</a>
**/
class ParsedHTML {
+ private Node _rootNode;
+
+ private URL _baseURL;
+
+ private String _baseTarget;
+
+ private String _characterSet;
+
private WebForm[] _forms;
private WebImage[] _images;
+ private WebLink[] _links;
private WebResponse _response;
@@ -64,7 +73,6 @@
/**
* Returns the form found in the page with the specified ID.
- * @exception SAXException thrown if there is an error parsing the response.
**/
public WebForm getFormWithID( String ID ) {
WebForm[] forms = getForms();
@@ -78,8 +86,7 @@
/**
* Returns the form found in the page with the specified name.
- * @exception SAXException thrown if there is an error parsing the response.
- **/
+ **/
public WebForm getFormWithName( String name ) {
WebForm[] forms = getForms();
for (int i = 0; i < forms.length; i++) {
@@ -300,7 +307,6 @@
/**
* Returns the domain object model associated with this page, to be used internally.
- * @author <a href="mailto:bx...@bi...">Benoit Xhenseval</a>
**/
Node getOriginalDOM() {
return _rootNode;
@@ -352,22 +358,6 @@
//---------------------------------- private members --------------------------------
-
- private Node _rootNode;
-
- private WebLink[] _links;
-
- private URL _baseURL;
-
- private String _baseTarget;
-
- private String _characterSet;
-
-
- private String getValue( Node node ) {
- return (node == null) ? "" : node.getNodeValue();
- }
-
/**
* Returns true if the node is a link anchor node.
|