Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions t/lib/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,15 @@ end
function _M.plugin_proxy_rewrite_args()
ngx.say("uri: ", ngx.var.uri)
local args = ngx.req.get_uri_args()
for k,v in pairs(args) do
ngx.say(k, ": ", v)

local keys = {}
for k, _ in pairs(args) do
table.insert(keys, k)
end
table.sort(keys)

for _, key in ipairs(keys) do
ngx.say(key, ": ", args[key])
end
end

Expand Down
9 changes: 3 additions & 6 deletions t/plugin/proxy-rewrite.t
Original file line number Diff line number Diff line change
Expand Up @@ -515,13 +515,10 @@ passed
=== TEST 17: rewrite uri args
--- request
GET /hello?q=apisix&a=iresty HTTP/1.1
--- response_body_like eval
qr/uri: \/plugin_proxy_rewrite_args(
q: apisix
a: iresty|
--- response_body
uri: /plugin_proxy_rewrite_args
a: iresty
q: apisix)
/
q: apisix
--- no_error_log
[error]

Expand Down