Commit
…d be treated as json null - fixes #1436
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -430,15 +430,15 @@ private void handleSendRequest() { | |
if (request.timeout > 0) { | ||
req.setTimeout(request.timeout); | ||
} | ||
if (body != null) { | ||
if (contentType != null) { | ||
String prev = req.headers().get(HttpHeaders.CONTENT_TYPE); | ||
if (prev == null) { | ||
req.putHeader(HttpHeaders.CONTENT_TYPE, contentType); | ||
} else { | ||
contentType = prev; | ||
} | ||
if (contentType != null) { | ||
String prev = req.headers().get(HttpHeaders.CONTENT_TYPE); | ||
if (prev == null) { | ||
req.putHeader(HttpHeaders.CONTENT_TYPE, contentType); | ||
} else { | ||
contentType = prev; | ||
} | ||
} | ||
if (body != null || "application/json".equals(contentType)) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
vietj
Author
Contributor
|
||
if (body instanceof MultiMap) { | ||
MultipartForm parts = MultipartForm.create(); | ||
MultiMap attributes = (MultiMap) body; | ||
|
Now NPE can happen in line 486 (for
JsonObject
instance). BTW is that branch (else if (body instanceof JsonObject)
) needed at all? Won'tJson.encode(body)
handle this case?