catlett 01/09/06 09:49:31
Modified: scrape/src/org/apache/taglibs/scrape HttpConnection.java
Log:
updated HttpConnection to be current with the new PageData
Revision Changes Path
1.3 +27 -8
jakarta-taglibs/scrape/src/org/apache/taglibs/scrape/HttpConnection.java
Index: HttpConnection.java
===================================================================
RCS file:
/home/cvs/jakarta-taglibs/scrape/src/org/apache/taglibs/scrape/HttpConnection.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- HttpConnection.java 2001/05/21 22:58:22 1.2
+++ HttpConnection.java 2001/09/06 16:49:31 1.3
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-taglibs/scrape/src/org/apache/taglibs/scrape/HttpConnection.java,v
1.2 2001/05/21 22:58:22 catlett Exp $
- * $Revision: 1.2 $
- * $Date: 2001/05/21 22:58:22 $
+ * $Header:
/home/cvs/jakarta-taglibs/scrape/src/org/apache/taglibs/scrape/HttpConnection.java,v
1.3 2001/09/06 16:49:31 catlett Exp $
+ * $Revision: 1.3 $
+ * $Date: 2001/09/06 16:49:31 $
*
* ====================================================================
*
@@ -96,6 +96,11 @@
* separator in the response headers list
*/
private static final char keySeparator = ':';
+ /**
+ * boolean values tells if this object is making it's http connection
+ * through proxies
+ */
+ private boolean useproxy = false;
/**
* constructor creates an instance of HttpConnection and calls the super class
@@ -106,6 +111,11 @@
*/
public HttpConnection(URL url) {
super(url);
+ try {
+ setFollowRedirects(true);
+ } catch (SecurityException se) {
+ // haven't yet figured out what I want to do
+ }
}
/**
@@ -148,8 +158,8 @@
}
/**
- * Implementation of the abstract method defined in the HttpURLConnection class
- * cut the current connection this object has
+ * Implementation of the abstract method defined in the HttpURLConnection
+ * class cut the current connection this object has
*
*/
public void disconnect() {
@@ -165,14 +175,23 @@
}
/**
- * Implementation of the abstract method defined in the HttpURLConnection class
- * this implementation does not use proxy
+ * Implementation of the abstract method defined in the HttpURLConnection
+ * class this implementation does not use proxy
*
* @return false proxy servers not used by this implementation
*
*/
public boolean usingProxy() {
- return false;
+ return useproxy;
+ }
+
+ /**
+ * set this instantiation of HttpConnection to use a proxy server for http
+ * connections
+ *
+ */
+ public final void setProxy() {
+ // not yet implemented
}
/**