HTTPCLIENT-2112: AbstractMultipartFormat respects ByteBuffer.arrayOffset (#253)
This commit is contained in:
parent
fa08f54077
commit
45c45d53e0
|
@ -50,7 +50,7 @@ abstract class AbstractMultipartFormat {
|
|||
final Charset charset, final String string) {
|
||||
final ByteBuffer encoded = charset.encode(CharBuffer.wrap(string));
|
||||
final ByteArrayBuffer bab = new ByteArrayBuffer(encoded.remaining());
|
||||
bab.append(encoded.array(), encoded.position(), encoded.remaining());
|
||||
bab.append(encoded.array(), encoded.arrayOffset() + encoded.position(), encoded.remaining());
|
||||
return bab;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue