summaryrefslogtreecommitdiff
path: root/bkucommon/src/main/java/at/gv/egiz/bku/binding
diff options
context:
space:
mode:
authormcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2010-01-26 16:22:56 +0000
committermcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2010-01-26 16:22:56 +0000
commit4a334069beb85654e3cb35aef7e4508e04127036 (patch)
tree2d1d9054f42845ce951c9b2c2239178c803443d3 /bkucommon/src/main/java/at/gv/egiz/bku/binding
parentb184b9e753daee529a2996832286fbaf3bf3a696 (diff)
downloadmocca-4a334069beb85654e3cb35aef7e4508e04127036.tar.gz
mocca-4a334069beb85654e3cb35aef7e4508e04127036.tar.bz2
mocca-4a334069beb85654e3cb35aef7e4508e04127036.zip
MOCCA 1.2.11 with SHA-2 enabled.
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/branches/mocca-1.2.11-sha2/mocca-1.2.11@599 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'bkucommon/src/main/java/at/gv/egiz/bku/binding')
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionImpl.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionImpl.java
index 93e5bb1c..82c1be53 100644
--- a/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionImpl.java
+++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionImpl.java
@@ -274,7 +274,12 @@ public class DataUrlConnectionImpl implements DataUrlConnectionSPI {
InputStreamReader reader = new InputStreamReader(formParameter.getData(),
(formParameter.getCharSet() != null)
? formParameter.getCharSet()
- : "UTF-8"); // assume request was application/x-www-form-urlencoded, formParam therefore UTF-8
+ : "UTF-8");
+ // Note, using UTF-8 as fallback for decoding is safe.
+ // If the request was x-www-form-urlencoded,
+ // UTF-8 has been used for encoding of non-ASCII characters.
+ // If the request was multipart/form-data and contains any transfer parameters,
+ // the data URL request is going to be multipart/form-data encoded (see below).
while ((len = reader.read(cbuf)) != -1) {
urlEnc.write(cbuf, 0, len);
}