apisix
apisix copied to clipboard
bug: ? Is replaced with %3
Issue description
The routing is configured as follows
{
"priority": 0,
"methods": [
"GET",
"OPTIONS"
],
"uris": [
"/conf/agent/config/raw/C/*"
],
"plugins": {
"proxy-rewrite": {
"regex_uri": [
"^/conf/agent/config/raw/C/(.*)/(.*)",
"/agent/api/v1/config/raw?appName=C&clusterName=$1&namespaceName=$2"
],
"scheme": "http"
}
}
}
? Is replaced with %3
127.0.0.1 - - [13/Nov/2020:04:07:58 +0000] "GET /agent/api/v1/config/raw%3FappName=C&clusterName=dev&namespaceName=router HTTP/1.1" 404
Environment
- apisix version (cmd:
apisix version): 1.5 - OS:centos7 @Docker
Minimal test code / Steps to reproduce the issue
1. 2. 3.
What's the actual result? (including assertion message & call stack if applicable)
What's the expected result?
@backnero I did not reproduce in my env, my upstream is built by python. Could you provide more information?
curl -X GET http://127.0.0.1:9080/conf/agent/config/raw/C/aa/aa
127.0.0.1 - - [13/Nov/2020 13:56:01] "GET /agent/api/v1/config/raw?appName=C&clusterName=aa&namespaceName=aa HTTP/1.1" 200 -
Host: 127.0.0.1
X-Real-IP: 127.0.0.1
X-Forwarded-For: 127.0.0.1
X-Forwarded-Proto: http
X-Forwarded-Host: 127.0.0.1
X-Forwarded-Port: 9080
User-Agent: curl/7.54.0
Accept: */*
I run you test and get /agent/api/v1/config/raw?appName=C&clusterName=dev&namespaceName=router which works normal.
Actually, it is %3F. If we urlencoded '?', we will get %3F. With this clue, you can check it again. Or is there something I missed?
please make a try with the lastest version or 2.0 . I remembered we have fixed this bug