<!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->

- [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.

### Environment

* Dubbo version: 3.2.5
* Operating System version: MAC OS 
* Java version: 17

### Steps to reproduce this issue

1. 定义rest接口并配置client=apache-http-client
```
**
 * 文件管理服务接口
 *
 * @author chaoxin.lu
 * @since 2018/6/28
 */
@RequestMapping("/oss")
public interface FileSvc {

    /**
     * 获取文件
     *
     * @param bucket
     * @param key   
     * @return
     */
    @GetMapping
    @ResponseBody
    R<FileEntry> getObject(@RequestParam("bucket") String bucket,
                           @RequestParam("key") String key);

}
```
```
dubbo:
    protocol:
        id: ${DUBBO_PROTOCOL:rest}
        name: ${DUBBO_PROTOCOL:rest}
        client: ${DUBBO_CLIENT:apache-http-client}
        port: ${DUBBO_PORT:20895}
        server: ${DUBBO_PROTOCOL_SERVER:netty}
```

3. 服务消费者如下
![image](https://github.com/apache/dubbo/assets/13815910/efbe78a3-b17e-4a2e-9dcb-3087021c368e)

Pls. provide [GitHub address] to reproduce this issue.

### Expected Behavior

<!-- What do you expect from the above steps？-->

### Actual Behavior

<!-- What actually happens? -->

If there is an exception, please attach the exception trace:

```
Caused by: java.lang.NullPointerException: Cannot invoke "org.apache.http.Header.getValue()" because the return value of "org.apache.http.client.methods.CloseableHttpResponse.getFirstHeader(String)" is null
	at org.apache.dubbo.remoting.http.restclient.HttpClientRestClient$1.getContentType(HttpClientRestClient.java:96)
	at org.apache.dubbo.rpc.protocol.rest.RestInvoker.lambda$doInvoke$0(RestInvoker.java:105)
	at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:863)
	at java.base/java.util.concurrent.CompletableFuture.uniWhenCompleteStage(CompletableFuture.java:887)
	at java.base/java.util.concurrent.CompletableFuture.whenComplete(CompletableFuture.java:2325)
	at org.apache.dubbo.rpc.protocol.rest.RestInvoker.doInvoke(RestInvoker.java:87)
	at org.apache.dubbo.rpc.protocol.AbstractInvoker.doInvokeAndReturn(AbstractInvoker.java:243)
	at org.apache.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:187)
	... 97 more
```
NPE点如下
![image](https://github.com/apache/dubbo/assets/13815910/a55a548a-23e6-4f5f-8a2e-b9ddb54ff17f)
使用默认的okhttp则没有该问题
![image](https://github.com/apache/dubbo/assets/13815910/22640e32-2bee-4ff5-a296-dbdf1077e1f7)

private final CloseableHttpClient closeableHttpClient;
    private final HttpClientConfig httpClientConfig;
    public HttpClientRestClient(HttpClientConfig clientConfig) {
        closeableHttpClient = createHttpClient();
        httpClientConfig = clientConfig;
    }
    @Override
    public CompletableFuture<RestResult> send(RequestTemplate requestTemplate) {
        HttpRequestBase httpRequest = null;
        String httpMethod = requestTemplate.getHttpMethod();
        httpRequest = createHttpUriRequest(httpMethod, requestTemplate);
        if (httpRequest instanceof HttpEntityEnclosingRequest) {
            ((HttpEntityEnclosingRequestBase) httpRequest).setEntity(new ByteArrayEntity(requestTemplate.getSerializedBody()));
        }
        Map<String, Collection<String>> allHeaders = requestTemplate.getAllHeaders();
        allHeaders.remove("Content-Length");
        
        for (String headerName : allHeaders.keySet()) {
            Collection<String> headerValues = allHeaders.get(headerName);
            for (String headerValue : headerValues) {
                httpRequest.addHeader(headerName, headerValue);