[OLINGO-989] Additional charset handling 1

Signed-off-by: Christian Amend <christian.amend@sap.com>
This commit is contained in:
Kanika Jashrapuria 2016-04-28 14:30:12 +05:30 committed by Christian Amend
parent 3e9e69314b
commit f46c680c9b
3 changed files with 4 additions and 4 deletions

View File

@ -235,7 +235,7 @@ public abstract class AbstractODataRequest extends AbstractRequest implements OD
final String value = getHeader(name);
if (StringUtils.isNotBlank(value)) {
baos.write((name + ": " + value).getBytes());
baos.write((name + ": " + value).getBytes(DEFAULT_CHARSET));
baos.write(ODataStreamer.CRLF);
}
}

View File

@ -87,7 +87,7 @@ public abstract class AbstractODataBatchRequestItem extends AbstractODataStreame
// stream batch content type
stream(ODataBatchConstants.ITEM_CONTENT_TYPE_LINE.getBytes(DEFAULT_CHARSET));
newLine();
stream(ODataBatchConstants.ITEM_TRANSFER_ENCODING_LINE.getBytes());
stream(ODataBatchConstants.ITEM_TRANSFER_ENCODING_LINE.getBytes(DEFAULT_CHARSET));
newLine();
stream((ODataBatchConstants.CHANGESET_CONTENT_ID_NAME + ":" + contentId).getBytes());
newLine();
@ -103,7 +103,7 @@ public abstract class AbstractODataBatchRequestItem extends AbstractODataStreame
// stream batch content type
stream(ODataBatchConstants.ITEM_CONTENT_TYPE_LINE.getBytes(DEFAULT_CHARSET));
newLine();
stream(ODataBatchConstants.ITEM_TRANSFER_ENCODING_LINE.getBytes());
stream(ODataBatchConstants.ITEM_TRANSFER_ENCODING_LINE.getBytes(DEFAULT_CHARSET));
newLine();
newLine();

View File

@ -116,7 +116,7 @@ public class ODataChangesetImpl extends AbstractODataBatchRequestItem
newLine();
// stream batch-boundary
stream(("--" + boundary).getBytes());
stream(("--" + boundary).getBytes(DEFAULT_CHARSET));
newLine();
// stream the request