LlorandoLau opened a new issue, #5906:
URL: https://github.com/apache/shenyu/issues/5906

   ### Question
   
   just same as issue #4375. I am working on master branch and running http 
test code. Use postman to make the following request: 
http://localhost:9195/http/shenyu/client/hello
   The response is as follows:
   `{
     "timestamp": "2025-01-20T09:53:57.356+00:00",
     "path": "/http/shenyu/client/hello",
     "status": 404,
     "error": "Not Found",
     "requestId": "bc388cce-116"
   }`
   
   I debug on NettyHttpClientPlugin and find its request url still has the 
prefix "http" which is not supposed here.
   
   <img width="1212" alt="Image" 
src="https://github.com/user-attachments/assets/55cc5a56-00e1-483f-b3bc-58ee668ea15b";
 />
   
   Then I checkout version 2.2.1 and find codes in DefaultSoulContextBuilder 
which is used to cut out a real path, as you could see below
   
   <img width="1297" alt="Image" 
src="https://github.com/user-attachments/assets/ba9415cd-2316-4a31-be1c-5b8c60e2b817";
 />
   
   But I could not find these codes anymore in master branch. I try to copy the 
code from DefaultSoulContextBuilder into DivideShenyuContextDecorator, and test 
again.  It works well.
   
   <img width="1218" alt="Image" 
src="https://github.com/user-attachments/assets/ba006f60-5fcd-4330-8ae3-42f544069e9e";
 />
   
   Emmm, what's more, I follow the debug chain and find 
DefaultShenyuContextBuilder#buildDefaultContext, where set request raw path as 
ShenyuContext path. 
   
   <img width="1236" alt="Image" 
src="https://github.com/user-attachments/assets/37006078-0c5e-4f1a-983b-fb780bc80b93";
 />
   
   Then DivideShenyuContextDecorator get path from ShenyuContext and use it as 
the real url. 
   
   I think the missing handling of request prefix causes this problem. Or could 
you please tell me whether there is any configuration missing.
   Thanks.
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to