- [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.

public void addConnectionManager(PoolingHttpClientConnectionManager connectionManager) {
            connectionManagers.add(connectionManager);
        }
        @Override
        public void run() {
            try {
                while (!shutdown) {
                    synchronized (this) {
                        wait(1000);
                        for (PoolingHttpClientConnectionManager connectionManager : connectionManagers) {
                            connectionManager.closeExpiredConnections();
                            
                            connectionManager.closeIdleConnections(30, TimeUnit.SECONDS);
                        }
                    }
                }
            } catch (InterruptedException ex) {
                shutdown();
            }
        }
        public void shutdown() {
            shutdown = true;
            connectionManagers.clear();
            synchronized (this) {
                notifyAll();
            }
        }
    }
}