Skip to content

Commit

Permalink
Merge pull request #213 from cognizone/feature/useNewTurtleContentType
Browse files Browse the repository at this point in the history
Replace application/x-turtle with text/turtle;charset=utf-8
  • Loading branch information
domivds authored Aug 30, 2023
2 parents e0700ff + ce7f4be commit 3c9d323
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private void addData(Model model, String graphUri, boolean replace) {
log.info("Calling {} with basic auth: {}", url, graphCrudUseBasicAuth);
HttpEntityEnclosingRequestBase request = replace ? new HttpPut(url) : new HttpPost(url);
request.setEntity(new ByteArrayEntity(data));
request.setHeader("Content-Type", "application/x-turtle");
request.setHeader("Content-Type", "text/turtle;charset=utf-8");
if (graphCrudUseBasicAuth) {
request.setHeader("Authorization", "Basic " + Base64.encodeBase64String((rdfStoreUser + ":" + rdfStorePassword).getBytes(StandardCharsets.UTF_8)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private void loadIntoGraph_exception(byte[] data, String updateUrl, boolean repl
conn.setDoOutput(true);
conn.setInstanceFollowRedirects(true);
conn.setRequestMethod(replace ? "PUT" : "POST");
conn.setRequestProperty("Content-Type", "application/x-turtle");
conn.setRequestProperty("Content-Type", "text/turtle;charset=utf-8");
conn.setRequestProperty("charset", "utf-8");
conn.setRequestProperty("Content-Length", Integer.toString(data.length));
if(sparqlGraphCrudUseBasicAuth) {
Expand Down

0 comments on commit 3c9d323

Please sign in to comment.