commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 12846] New: - [PATCH] UTF-16 -> ISO-8859-1 in RequestImpl.java
Date Fri, 20 Sep 2002 09:34:06 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=12846>.
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=12846

[PATCH] UTF-16 -> ISO-8859-1 in RequestImpl.java

           Summary: [PATCH] UTF-16 -> ISO-8859-1 in RequestImpl.java
           Product: Commons
           Version: Nightly Builds
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Latka
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: janekdb@yahoo.co.uk


This patch changes the encoding used when creating an InputStream to use as the
request body of the PostMethod object. UTF-16 was wrong because it is a two byte
encoding.


Index: RequestImpl.java
===================================================================
RCS file:
/home/cvspublic/jakarta-commons/latka/src/java/org/apache/commons/latka/http/RequestImpl.java,v
retrieving revision 1.31
diff -u -r1.31 RequestImpl.java
--- RequestImpl.java	18 Sep 2002 16:03:36 -0000	1.31
+++ RequestImpl.java	20 Sep 2002 08:34:08 -0000
@@ -265,7 +265,7 @@
         }
         
         if (_requestBody != null) {
-            InputStream  is = new
ByteArrayInputStream(_requestBody.getBytes("UTF-16"));
+            InputStream  is = new
ByteArrayInputStream(_requestBody.getBytes("ISO-8859-1"));
             ((PostMethod) _httpMethod).setRequestBody(is);
         } else {
             List parameters = _parameters.getParameters();

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message