tokers commented on a change in pull request #4676:
URL: https://github.com/apache/apisix/pull/4676#discussion_r677052901
##########
File path: apisix/core/ctx.lua
##########
@@ -159,10 +160,22 @@ do
val, err = cookie:get(sub_str(key, 8))
if err then
log.warn("failed to fetch cookie value by key: ",
- key, " error: ", err)
+ key, " error: ", err)
end
end
+ elseif core_str.has_prefix(key, "arg_") then
+ local args = t.args
+ local arg_key = sub_str(key, 5);
Review comment:
```suggestion
local arg_key = sub_str(key, 5)
```
##########
File path: apisix/core/ctx.lua
##########
@@ -159,10 +160,22 @@ do
val, err = cookie:get(sub_str(key, 8))
if err then
log.warn("failed to fetch cookie value by key: ",
- key, " error: ", err)
+ key, " error: ", err)
end
end
+ elseif core_str.has_prefix(key, "arg_") then
+ local args = t.args
+ local arg_key = sub_str(key, 5);
+ local m, err = ngx_re_match(args, "(^|&)" .. arg_key ..
"=([^&]*)(&|$)", "jo")
+ if err then
+ log.warn("failed to fetch arg value by key: ",
+ key, " error: ", err)
Review comment:
```suggestion
log.warn("failed to fetch arg value by key: ",
key, " error: ", err)
```
##########
File path: apisix/core/ctx.lua
##########
@@ -159,10 +160,22 @@ do
val, err = cookie:get(sub_str(key, 8))
if err then
log.warn("failed to fetch cookie value by key: ",
- key, " error: ", err)
+ key, " error: ", err)
Review comment:
Please revert this change, the original indent is good.
--
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]