Skip to content

Commit

Permalink
Removing buggy default Content-Type setting in OkHttpAsyncClient (Azu…
Browse files Browse the repository at this point in the history
  • Loading branch information
anuchandy authored Jan 24, 2020
1 parent ecd63d3 commit ebbc077
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class OkHttpAsyncHttpClient implements HttpClient {
private final OkHttpClient httpClient;
//
private static final Mono<okio.ByteString> EMPTY_BYTE_STRING_MONO = Mono.just(okio.ByteString.EMPTY);
private static final MediaType MEDIA_TYPE_OCTET_STREAM = MediaType.parse("application/octet-stream");

OkHttpAsyncHttpClient(OkHttpClient httpClient) {
this.httpClient = httpClient;
Expand Down Expand Up @@ -118,7 +117,7 @@ private static Mono<RequestBody> toOkHttpRequestBody(Flux<ByteBuffer> bbFlux, Ht
return bsMono.map(bs -> {
String contentType = headers.getValue("Content-Type");
if (contentType == null) {
return RequestBody.create(bs, MEDIA_TYPE_OCTET_STREAM);
return RequestBody.create(bs, null);
} else {
return RequestBody.create(bs, MediaType.parse(contentType));
}
Expand Down

0 comments on commit ebbc077

Please sign in to comment.