remm 01/06/20 08:56:33
Modified: httpclient/src/java/org/apache/commons/httpclient/methods
HeadMethod.java
Log:
- HEAD never has a response body.
Revision Changes Path
1.3 +16 -3
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/HeadMethod.java
Index: HeadMethod.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/HeadMethod.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- HeadMethod.java 2001/05/21 19:59:55 1.2
+++ HeadMethod.java 2001/06/20 15:56:30 1.3
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/HeadMethod.java,v
1.2 2001/05/21 19:59:55 rwaldhoff Exp $
- * $Revision: 1.2 $
- * $Date: 2001/05/21 19:59:55 $
+ * $Header:
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/methods/HeadMethod.java,v
1.3 2001/06/20 15:56:30 remm Exp $
+ * $Revision: 1.3 $
+ * $Date: 2001/06/20 15:56:30 $
*
* ====================================================================
*
@@ -100,14 +100,17 @@
setFollowRedirects(true);
}
+
// ---------------------------------------------------------------- Methods
+
// override recycle to reset redirects default
public void recycle() {
super.recycle();
setFollowRedirects(true);
}
+
// --------------------------------------------------- WebdavMethod Methods
@@ -137,6 +140,16 @@
* @return true if a content-length header will be expected by the server
*/
public boolean needContentLength() {
+ return false;
+ }
+
+
+ /**
+ * Return true if the method's response is expected to have a body.
+ *
+ * @return true if a response body should be expected by the client
+ */
+ public boolean hasResponseBody() {
return false;
}