[OLINGO-832] Fixed channel copy

This commit is contained in:
Michael Bolz 2016-01-25 13:29:52 +01:00
parent 69f58e84bf
commit 0cc2199437
2 changed files with 2 additions and 1 deletions

View File

@ -168,7 +168,7 @@ public class ODataHttpHandlerImpl implements ODataHttpHandler {
while (input.read(inBuffer) > 0) {
inBuffer.flip();
output.write(inBuffer);
inBuffer.rewind();
inBuffer.clear();
}
} catch (IOException e) {
throw new ODataRuntimeException("Error on reading request content", e);

View File

@ -71,6 +71,7 @@ public class ChannelSerializerResult implements SerializerResult {
if(r <= dest.remaining()) {
dest.put(buffer);
} else {
r = dest.remaining();
byte[] buf = new byte[dest.remaining()];
buffer.get(buf);
dest.put(buf);