You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/10/10 06:47:35 UTC
[GitHub] [apisix] idbeta opened a new issue #2375: request help: setted a special uri in route,when request it,it return 404
idbeta opened a new issue #2375:
URL: https://github.com/apache/apisix/issues/2375
### Issue description
curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{"uri": "/helloh~E]ftXnj2Hs#r9&Rg:Y/;o-OI,uN7Le!P_J+w.zi4C0aDA3WMqU1T*KVZ?GmdFlQ5", "upstream": {"nodes": {"127.0.0.1:9666": 1}, "type": "roundrobin"}}'
it returned 200
but when i reuqest the uri
http://127.0.0.1:9080/helloh~E]ftXnj2Hs#r9&Rg:Y/;o-OI,uN7Le!P_J+w.zi4C0aDA3WMqU1T*KVZ?GmdFlQ5
it returned 404
### Environment
* apisix version (cmd: `apisix version`): master
* OS:
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] membphis edited a comment on issue #2375: request help: setted a special uri in route,when request it,it return 404
Posted by GitBox <gi...@apache.org>.
membphis edited a comment on issue #2375:
URL: https://github.com/apache/apisix/issues/2375#issuecomment-706667420
a correct test case:
```shell
$ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
{
"uri": "/helloh~E]ftXnj2Hs",
"upstream": {"nodes": {"127.0.0.1:9666": 1}, "type": "roundrobin"}
}'
$ curl -i 'http://127.0.0.1:9080/helloh~E%5DftXnj2Hs'
HTTP/1.1 200 Bad Gateway
Date: Sun, 11 Oct 2020 08:04:45 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 154
... ...
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] membphis commented on issue #2375: request help: setted a special uri in route,when request it,it return 404
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2375:
URL: https://github.com/apache/apisix/issues/2375#issuecomment-706667420
so a right test case should be:
```shell
$ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
{
"uri": "/helloh~E]ftXnj2Hs",
"upstream": {"nodes": {"127.0.0.1:9666": 1}, "type": "roundrobin"}
}'
$ $ curl -i 'http://127.0.0.1:9080/helloh~E%5DftXnj2Hs'
HTTP/1.1 200 Bad Gateway
Date: Sun, 11 Oct 2020 08:04:45 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 154
... ...
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] idbeta edited a comment on issue #2375: request help: setted a special uri in route,when request it,it return 404
Posted by GitBox <gi...@apache.org>.
idbeta edited a comment on issue #2375:
URL: https://github.com/apache/apisix/issues/2375#issuecomment-706519431
> > ```shell
> > /helloh~E]ftXnj2Hs
> > ```
>
> it is not a valid URI address, the Admin API should return 400 for this case.
how about this uri?
```shell
$ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
{
"uri": "/helloF.C6ITO~HSRgJ)JRF3x7CEBnQNyBI1lbjz$R8GXLKpDfTcwwk-nS4~(iprHlA3Qe5:cX(fY-1blh(C,tMKD_dbw;HxCxZadT$8Ae.w-N~TU)24udFogqufYx6Lu@v,XWrdauEI9Eq_6O340,2e,Z$Zhot+nPK3gSU6j$P0z6ts+V5VU:xMo49/IimOS5plD~UA3sreDjU+yEJ7W;;,zpf~_q7qihB0sPe-F@/1)XFG9LP:avzhOELhW0M$8Y9(V_i_KQYnvbyA(/2zR.L:)@-kkH8k;CorXcdsbHqMny;Nv+V97cBMOA:4cIS2m+JmaRumV",
"upstream": {"nodes": {"127.0.0.1:9666": 1}, "type": "roundrobin"}
}'
HTTP/1.1 200 OK
Date: Sat, 10 Oct 2020 08:22:37 GMT
Content-Type: application/json
... ...
```
when I request the uri
```shell
$ curl -i 'http://127.0.0.1:9080/helloF.C6ITO~HSRgJ)JRF3x7CEBnQNyBI1lbjz$R8GXLKpDfTcwwk-nS4~(iprHlA3Qe5:cX(fY-1blh(C,tMKD_dbw;HxCxZadT$8Ae.w-N~TU)24udFogqufYx6Lu@v,XWrdauEI9Eq_6O340,2e,Z$Zhot+nPK3gSU6j$P0z6ts+V5VU:xMo49/IimOS5plD~UA3sreDjU+yEJ7W;;,zpf~_q7qihB0sPe-F@/1)XFG9LP:avzhOELhW0M$8Y9(V_i_KQYnvbyA(/2zR.L:)@-kkH8k;CorXcdsbHqMny;Nv+V97cBMOA:4cIS2m+JmaRumV'
HTTP/1.1 404 Not Found
... ...
```
also, I tried the following two URIs and have the same problem:
'http://127.0.0.1:9080/hello-n~U.X-C_Px/gB_t.Y/./i'
'http://127.0.0.1:9080/hello-A~L~s-z.~L_e-H//Q'
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] moonming closed issue #2375: request help: setted a special uri in route,when request it,it return 404
Posted by GitBox <gi...@apache.org>.
moonming closed issue #2375:
URL: https://github.com/apache/apisix/issues/2375
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] membphis edited a comment on issue #2375: request help: setted a special uri in route,when request it,it return 404
Posted by GitBox <gi...@apache.org>.
membphis edited a comment on issue #2375:
URL: https://github.com/apache/apisix/issues/2375#issuecomment-706512050
> ```shell
> http://127.0.0.1:9080/helloh~E]ftXnj2Hs#r9&Rg:Y/;o-OI,uN7Le!P_J+w.zi4C0aDA3WMqU1T*KVZ?GmdFlQ5
> ```
it is not a valid URI address, the Admin API should return 400 for this case.
it can not contain `#`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] moonming closed issue #2375: request help: setted a special uri in route,when request it,it return 404
Posted by GitBox <gi...@apache.org>.
moonming closed issue #2375:
URL: https://github.com/apache/apisix/issues/2375
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] idbeta commented on issue #2375: request help: setted a special uri in route,when request it,it return 404
Posted by GitBox <gi...@apache.org>.
idbeta commented on issue #2375:
URL: https://github.com/apache/apisix/issues/2375#issuecomment-706519431
> > ```shell
> > /helloh~E]ftXnj2Hs
> > ```
>
> it is not a valid URI address, the Admin API should return 400 for this case.
how about this uri?
```shell
$ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
{
"uri": "/helloF.C6ITO~HSRgJ)JRF3x7CEBnQNyBI1lbjz$R8GXLKpDfTcwwk-nS4~(iprHlA3Qe5:cX(fY-1blh(C,tMKD_dbw;HxCxZadT$8Ae.w-N~TU)24udFogqufYx6Lu@v,XWrdauEI9Eq_6O340,2e,Z$Zhot+nPK3gSU6j$P0z6ts+V5VU:xMo49/IimOS5plD~UA3sreDjU+yEJ7W;;,zpf~_q7qihB0sPe-F@/1)XFG9LP:avzhOELhW0M$8Y9(V_i_KQYnvbyA(/2zR.L:)@-kkH8k;CorXcdsbHqMny;Nv+V97cBMOA:4cIS2m+JmaRumV",
"upstream": {"nodes": {"127.0.0.1:9666": 1}, "type": "roundrobin"}
}'
HTTP/1.1 200 OK
Date: Sat, 10 Oct 2020 08:22:37 GMT
Content-Type: application/json
... ...
```
when I request the uri
```shell
$ curl -i 'http://127.0.0.1:9080/helloF.C6ITO~HSRgJ)JRF3x7CEBnQNyBI1lbjz$R8GXLKpDfTcwwk-nS4~(iprHlA3Qe5:cX(fY-1blh(C,tMKD_dbw;HxCxZadT$8Ae.w-N~TU)24udFogqufYx6Lu@v,XWrdauEI9Eq_6O340,2e,Z$Zhot+nPK3gSU6j$P0z6ts+V5VU:xMo49/IimOS5plD~UA3sreDjU+yEJ7W;;,zpf~_q7qihB0sPe-F@/1)XFG9LP:avzhOELhW0M$8Y9(V_i_KQYnvbyA(/2zR.L:)@-kkH8k;CorXcdsbHqMny;Nv+V97cBMOA:4cIS2m+JmaRumV'
HTTP/1.1 404 Not Found
... ...
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] idbeta removed a comment on issue #2375: request help: setted a special uri in route,when request it,it return 404
Posted by GitBox <gi...@apache.org>.
idbeta removed a comment on issue #2375:
URL: https://github.com/apache/apisix/issues/2375#issuecomment-706519431
> > ```shell
> > /helloh~E]ftXnj2Hs
> > ```
>
> it is not a valid URI address, the Admin API should return 400 for this case.
how about this uri?
```shell
$ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
{
"uri": "/helloF.C6ITO~HSRgJ)JRF3x7CEBnQNyBI1lbjz$R8GXLKpDfTcwwk-nS4~(iprHlA3Qe5:cX(fY-1blh(C,tMKD_dbw;HxCxZadT$8Ae.w-N~TU)24udFogqufYx6Lu@v,XWrdauEI9Eq_6O340,2e,Z$Zhot+nPK3gSU6j$P0z6ts+V5VU:xMo49/IimOS5plD~UA3sreDjU+yEJ7W;;,zpf~_q7qihB0sPe-F@/1)XFG9LP:avzhOELhW0M$8Y9(V_i_KQYnvbyA(/2zR.L:)@-kkH8k;CorXcdsbHqMny;Nv+V97cBMOA:4cIS2m+JmaRumV",
"upstream": {"nodes": {"127.0.0.1:9666": 1}, "type": "roundrobin"}
}'
HTTP/1.1 200 OK
Date: Sat, 10 Oct 2020 08:22:37 GMT
Content-Type: application/json
... ...
```
when I request the uri
```shell
$ curl -i 'http://127.0.0.1:9080/helloF.C6ITO~HSRgJ)JRF3x7CEBnQNyBI1lbjz$R8GXLKpDfTcwwk-nS4~(iprHlA3Qe5:cX(fY-1blh(C,tMKD_dbw;HxCxZadT$8Ae.w-N~TU)24udFogqufYx6Lu@v,XWrdauEI9Eq_6O340,2e,Z$Zhot+nPK3gSU6j$P0z6ts+V5VU:xMo49/IimOS5plD~UA3sreDjU+yEJ7W;;,zpf~_q7qihB0sPe-F@/1)XFG9LP:avzhOELhW0M$8Y9(V_i_KQYnvbyA(/2zR.L:)@-kkH8k;CorXcdsbHqMny;Nv+V97cBMOA:4cIS2m+JmaRumV'
HTTP/1.1 404 Not Found
... ...
```
also, I tried the following two URIs and have the same problem:
'http://127.0.0.1:9080/hello-n~U.X-C_Px/gB_t.Y/./i'
'http://127.0.0.1:9080/hello-A~L~s-z.~L_e-H//Q'
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] membphis commented on issue #2375: request help: setted a special uri in route,when request it,it return 404
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2375:
URL: https://github.com/apache/apisix/issues/2375#issuecomment-706512050
> ```shell
> /helloh~E]ftXnj2Hs
> ```
it is not a valid URI address, the Admin API should return 400 for this case.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org