Baoyuantop commented on code in PR #14040:
URL: https://github.com/apache/apisix/pull/14040#discussion_r4284406738


##########
apisix/init.lua:
##########
@@ -882,8 +882,9 @@ function _M.http_access_phase()
 
             api_ctx.var.uri = new_uri
             -- Forward the original path so servlet upstreams can consume 
params
-            -- after ';'. URI-encode it before proxying to keep delimiters as 
path data.
-            api_ctx.var.upstream_uri = core.utils.uri_safe_encode(uri)
+            -- after ';'. URI-encode it and store separately so $is_args$args 
can
+            -- be appended after rewrite and access plugin phases complete.
+            api_ctx.servlet_upstream_uri = core.utils.uri_safe_encode(uri)

Review Comment:
   Early plugins lose servlet path parameters
   
   With servlet normalization enabled, upstream_uri stays empty during rewrite 
and access plugins. The external pre-request runner sees a stripped path, and 
GraphQL introspection can target a different endpoint than the forwarded 
request.
   
   Example: For /anything;jsessionid=x, the pre-request runner now receives 
/anything; the upstream receives /anything;jsessionid=x. A GraphQL endpoint 
available only at the latter path fails schema discovery at the former 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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to