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

### Environment

* Dubbo version: latest

### Step to reproduce this issue

1. export a rest service DemoService with a url: rest://127.0.0.1:4444/test/
2. then we will get a real rest service with rest://127.0.0.1:4444/test/DemoService
3. but when we export a rest service DemoService with a url: rest://127.0.0.1:4444/test
4. then we will get a real rest service with rest://127.0.0.1:4444/DemoService

Those are the different results, in the second case the context path test is missing.
So users use explicit exporter and invoker to call rest services, they would feel puzzled.

We should fix it by modifying getContextPath method.

connectionManager.setMaxTotal(url.getParameter(Constants.CONNECTIONS_KEY, 20));
        connectionManager.setDefaultMaxPerRoute(url.getParameter(Constants.CONNECTIONS_KEY, 20));
        connectionMonitor.addConnectionManager(connectionManager);
        RequestConfig requestConfig = RequestConfig.custom()
                .setConnectTimeout(url.getParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT))
                .setSocketTimeout(url.getParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT))
                .build();
        SocketConfig socketConfig = SocketConfig.custom()
                .setSoKeepAlive(true)
                .setTcpNoDelay(true)
                .build();
        CloseableHttpClient httpClient = HttpClientBuilder.create()
                .setKeepAliveStrategy(new ConnectionKeepAliveStrategy() {
                    @Override
                    public long getKeepAliveDuration(HttpResponse response, HttpContext context) {
                        HeaderElementIterator it = new BasicHeaderElementIterator(response.headerIterator(HTTP.CONN_KEEP_ALIVE));
                        while (it.hasNext()) {
                            HeaderElement he = it.nextElement();
                            String param = he.getName();
                            String value = he.getValue();
                            if (value != null && param.equalsIgnoreCase("timeout")) {
                                return Long.parseLong(value) * 1000;
                            }
                        }
                        
                        return 30 * 1000;
                    }
                })
                .setDefaultRequestConfig(requestConfig)