You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by bu...@apache.org on 2008/06/05 04:43:37 UTC

DO NOT REPLY [Bug 45132] New: java.net. URLDecoder can not decode post data sent from microsoft ie 7.0 well

https://issues.apache.org/bugzilla/show_bug.cgi?id=45132

           Summary: java.net.URLDecoder can not decode post data sent from
                    microsoft ie 7.0 well
           Product: JMeter
           Version: 2.3.1
          Platform: PC
        OS/Version: Windows Vista
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTTP
        AssignedTo: jmeter-dev@jakarta.apache.org
        ReportedBy: javalai@gmail.com
                CC: kanekotky@yahoo.co.jp
        Depends on: 38115


Created an attachment (id=22075)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22075)
Main program to demostrate the difference between url-decoders.

Given a unicode character (codepoint: \u5A77) and its double-byte
representation 0xB4 0x40 in Cp950/Big5, the microsoft internet explorer 7.0 in
asian versions of windows will encode this character to a url-encoded string
"%B4@". This result is correct according to RFC-1738 since the @ (at) is a
reserved character.

However, using java.net.URLDecoder of IBM Java 5.0 SDK to decode "%B4@" with
Cp950 encoding will result in a single character "@" which means the precedent
"%B4" is truncated after the decoding. Using the Sun Java 5.0/6.0 SDK version
results in a strange \ufffd\u0040. Fortunately using Apache Commons URLCodec
will decode "%B4@" with Cp950 encoding to the original unicode
character(codepoint: \u5A77). Obviously Apache Commons URLCodec gives better
compatibility than java.net.URLDecoder.

I first found this problem in the constructor of
org.apache.jmeter.protocol.http.util.HTTPArgument. But I think this problem
will apply to every DBCS characters whose low-byte is smaller than 0x7F(127).
As a result the ues of java.net.URLDecoder in JMeter codebase should be
reconsidered.

I will attach a simple main program to demostrate the difference.

Regards,


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org