Skip to content

Commit

Permalink
Merge pull request #167 from iBuddha/master
Browse files Browse the repository at this point in the history
'utf-8' is not a valid value for the Content-Encoding header
  • Loading branch information
liuyou2 authored Jun 22, 2020
2 parents 8d85b81 + e7e6ffe commit ea4a482
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ public Project createProject(Project project, Session session) throws AppJointEr
params.add(new BasicNameValuePair("name", project.getName()));
params.add(new BasicNameValuePair("description", project.getDescription()));
HttpPost httpPost = new HttpPost(projectUrl);
httpPost.addHeader(HTTP.CONTENT_ENCODING, "UTF-8");
httpPost.addHeader(HTTP.CONTENT_ENCODING, HTTP.IDENTITY_CODING);
CookieStore cookieStore = new BasicCookieStore();
cookieStore.addCookie(session.getCookies()[0]);
HttpEntity entity = EntityBuilder.create().setContentEncoding("UTF-8").
setContentType(ContentType.create("application/x-www-form-urlencoded", Consts.UTF_8))
HttpEntity entity = EntityBuilder.create()
.setContentType(ContentType.create("application/x-www-form-urlencoded", Consts.UTF_8))
.setParameters(params).build();
httpPost.setEntity(entity);
CloseableHttpClient httpClient = null;
Expand Down

0 comments on commit ea4a482

Please sign in to comment.