Return-Path: Mailing-List: contact commons-httpclient-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-httpclient-dev@jakarta.apache.org Received: (qmail 5617 invoked from network); 29 Apr 2003 11:54:36 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 29 Apr 2003 11:54:36 -0000 Received: (qmail 18170 invoked by uid 50); 29 Apr 2003 11:56:34 -0000 Date: 29 Apr 2003 11:56:34 -0000 Message-ID: <20030429115634.18169.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: commons-httpclient-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 19424] New: - GetMethod.java checks the "used" flag which cannot be set at this time X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19424 GetMethod.java checks the "used" flag which cannot be set at this time Summary: GetMethod.java checks the "used" flag which cannot be set at this time Product: Commons Version: Nightly Builds Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: HttpClient AssignedTo: commons-httpclient-dev@jakarta.apache.org ReportedBy: max@linuxtag.org GetMethod.getResponseBodyAsStream calls HttpMethodBase.checkUsed, which asserts the flag "used" is "true". But at this time, "used" cannot be true, as "used" is set to true in HttpMethodBase.processRequest, two lines after readResponse is called (which in turn calls readResponseBody / readResponseBodyAsStream). Maybe "requestSent" is the flag which should be checked instead of "used"? My stack trace: (fragment) java.lang.IllegalStateException: Not Used. at org.apache.commons.httpclient.HttpMethodBase.checkUsed(HttpMethodBase.java:1642) at org.apache.commons.httpclient.methods.GetMethod.getResponseBodyAsStream(GetMethod.java:309) at org.apache.commons.httpclient.methods.GetMethod.readResponseBody(GetMethod.java:428) at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1893) at org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodBase.java:2496) at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1062) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:599) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:497) at org.apache.webdav.lib.WebdavResource.getMethodData(WebdavResource.java:2227) at org.apache.webdav.lib.WebdavResource.getMethodData(WebdavResource.java:2206) [...]