commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Hyatt <>
Subject [HttpClient] URI request fix and multiple method fix
Date Thu, 19 Sep 2002 16:22:52 GMT

There are two bugs in HttpClient I've noticed.  One is the simple
matter that the HTTP request is escaped.  It should not be.  THe
fix for this:

RCS file: /home/cvspublic/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/,v
retrieving revision 1.55
diff -r1.55
<         buf.append((null == reqPath)
<                    ? "/" : URIUtil.encode(reqPath, URIUtil.pathSafe()));
>         buf.append(null == reqPath ? "/" : reqPath);

The next is that you cannot execute two methods in a row (to the same
url, with different parameters, say), instead you had to close
and create a new HttpClient.  THe solution is simple, we just have to
make sure our session is closed before we open a new one.  The
patch is:

RCS file: /home/cvspublic/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/,v
retrieving revision 1.54
diff -r1.54
>         // Stop the old session before creating a new one
>         try {
>             endSession();
>         } catch (IOException e) {
>             log.error("HttpClient.startSession: error closing the old session before
starting the new one");
>         } 

BTW, for some reason I cannot subscribe to any of the jakarta lists.
So if you want to communicate with me, it would be most reliable to
mail me back at this address.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message