Fixed utf-8 encoding
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/data-miner-manager@158491 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
83bdf26878
commit
81cd9e0eae
|
@ -553,17 +553,20 @@ public class SClient4WPSSession implements Serializable {
|
|||
|
||||
URL url = new URL(urlString);
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
|
||||
conn.setRequestMethod("POST");
|
||||
conn.setRequestProperty("Authorization", "Basic " + encoded);
|
||||
conn.setRequestProperty("Accept-Encoding", "gzip");
|
||||
conn.setRequestProperty("Content-Type", "text/xml");
|
||||
conn.setRequestProperty("Content-Type", "text/xml; charset=UTF-8");
|
||||
conn.setDoOutput(true);
|
||||
obj.save(conn.getOutputStream());
|
||||
InputStream input = null;
|
||||
String encoding = conn.getContentEncoding();
|
||||
if (encoding != null && encoding.equalsIgnoreCase("gzip")) {
|
||||
logger.debug("Read encoding GZIP");
|
||||
input = new GZIPInputStream(conn.getInputStream());
|
||||
} else {
|
||||
logger.debug("Read encoding: "+encoding);
|
||||
input = conn.getInputStream();
|
||||
}
|
||||
return input;
|
||||
|
|
Loading…
Reference in New Issue