Skip to content

Commit

Permalink
Merge pull request #677 from MikhailMel/fix_query_charset_with_ed
Browse files Browse the repository at this point in the history
Fixed the content type in requests with external data
  • Loading branch information
zhicwu authored Jun 25, 2021
2 parents d280e43 + 2f9145b commit 989f9f7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,9 @@ private InputStream getInputStream(
requestEntity = new StringEntity(sql, StandardCharsets.UTF_8);
} else {
MultipartEntityBuilder entityBuilder = MultipartEntityBuilder.create();
entityBuilder.addTextBody("query", sql);

ContentType queryContentType = ContentType.create(ContentType.TEXT_PLAIN.getMimeType(), StandardCharsets.UTF_8);
entityBuilder.addTextBody("query", sql, queryContentType);

try {
for (ClickHouseExternalData externalDataItem : externalData) {
Expand Down

0 comments on commit 989f9f7

Please sign in to comment.