mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)
121563 jkaabimofrad: RA-640: Fixed encoding issue when updating binary content, as well as, multipart uploading. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126412 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2014 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2016 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -880,8 +880,8 @@ public class PublicApiHttpClient
|
||||
public BinaryRequestEntity(File file, String mimeType, String charset)
|
||||
{
|
||||
this.file = file;
|
||||
this.mimeType = (mimeType == null) ? "application/octet-stream" : mimeType;
|
||||
this.charset = (charset == null) ? "UTF-8" : charset;
|
||||
this.mimeType = mimeType;
|
||||
this.charset = charset;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -918,7 +918,15 @@ public class PublicApiHttpClient
|
||||
@Override
|
||||
public String getContentType()
|
||||
{
|
||||
return mimeType + "; " + charset;
|
||||
if (charset == null)
|
||||
{
|
||||
return mimeType;
|
||||
}
|
||||
if (mimeType == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return mimeType + "; charset=" + charset;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user