Add charset=UTF-8 to HTTP Content-Type for reconciliation queries.

Fixes problem where non-ASCII characters would be URL encoded as UTF-8, but interpreted according to the whims of the server.
This commit is contained in:
Matthew Blissett 2014-11-28 10:45:22 +00:00
parent c15f8d1ffd
commit f3e2b9622a
2 changed files with 2 additions and 2 deletions

View File

@ -167,7 +167,7 @@ public class GuessTypesOfColumnCommand extends Command {
URL url = new URL(serviceUrl);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
{
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
connection.setConnectTimeout(30000);
connection.setDoOutput(true);

View File

@ -335,7 +335,7 @@ public class StandardReconConfig extends ReconConfig {
URL url = new URL(service);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
{
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
connection.setConnectTimeout(30000);
connection.setDoOutput(true);