You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2002/09/20 11:34:06 UTC
DO NOT REPLY [Bug 12846] New: -
[PATCH] UTF-16 -> ISO-8859-1 in RequestImpl.java
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>