hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 20481] New: - Possible error with PostMethod.generateRequestBody() when using a parameter of the form: select(c)
Date Wed, 04 Jun 2003 15:04:47 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20481>.
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=20481

Possible error with PostMethod.generateRequestBody() when using a parameter of the form: select(c)

           Summary: Possible error with PostMethod.generateRequestBody()
                    when using a parameter of the form: select(c)
           Product: Commons
           Version: 2.0 Beta 1
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: HttpClient
        AssignedTo: commons-httpclient-dev@jakarta.apache.org
        ReportedBy: cdmein@yahoo.co.uk


As always I'd like to pass on my thanks, I'm finding HttpClient really useful.

The problem occurs because I use Struts map based ActionForm and these generate 
request parameters of the form:

<input type="text" name="searchSelection(c)">

When this is submitted using the PostMethod class the generateRequestBody() is 
called and in turn this calls the URI.encode() method with a BitSet of the 
acceptable characters. In this case the '(' and ')' characters are marked as 
acceptable.

The problem is that this does not work correctly when I submit it to my remote 
server. If however I issue the request directly (from a webpage rather than 
using HttpClient) it works and when I examine the request input stream I can see 
that the parameter has been re-written so that 'select(c)' is displayed as 
'select%28c%29'.

This may be my error because of encoding problems or the fact I am not setting 
the content type etc. correctly. Or it could be a bug. I'm afraid my HTTP 
knowledge is not good enough.

Chris Mein

Mime
View raw message