liangrongjie opened a new issue #1215: The CseClientHttpRequest automatically 
adds the path variable named ‘null’.
URL: https://github.com/apache/servicecomb-java-chassis/issues/1215
 
 
   When the Cse is used as the client to send a request without the path 
variable to other microservices, the cse automatically adds a redundant 
variable named "null".
   
   The original path`/v1/countries` is changed to `/v1/countries?null`.
   
   The code is in the 
`org.apache.servicecomb.provider.springmvc.reference.CseClientHttpRequest#prepareInvocation(Object[])`
   ```java
   invocation.getHandlerContext().put(RestConst.REST_CLIENT_REQUEST_PATH,
           path + "?" + this.uri.getRawQuery());
   ```
   
   when request path  without the path variable, the ` this.uri.getRawQuery()` 
return null (*not string ""*);executes the request at the 
`org.apache.servicecomb.transport.rest.client.http.RestClientInvocation#createRequestPath(RestOperationMeta)`
   obtained incorrect path from invocation.handlerContext.
   
   ```java
   String path = (String) 
invocation.getHandlerContext().get(RestConst.REST_CLIENT_REQUEST_PATH);
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to