Fix rest protocol NPE when using apache-http-client (#12916) (#12984)

This commit is contained in:
aofall 2023-09-05 11:22:21 +08:00 committed by GitHub
parent cdd7a40564
commit 35746aaf5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -93,7 +93,8 @@ public class HttpClientRestClient implements RestClient {
future.complete(new RestResult() {
@Override
public String getContentType() {
return response.getFirstHeader("Content-Type").getValue();
Header header = response.getFirstHeader("Content-Type");
return header == null ? null : header.getValue();
}
@Override