Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: route's label search is return 400 #1186

Closed
idbeta opened this issue Jan 4, 2021 · 2 comments · Fixed by #1197
Closed

bug: route's label search is return 400 #1186

idbeta opened this issue Jan 4, 2021 · 2 comments · Fixed by #1197
Assignees
Labels
bug Something isn't working
Milestone

Comments

@idbeta
Copy link
Contributor

idbeta commented Jan 4, 2021

Bug report

Describe the bug

the lable of route is a:1
when search on route, is return 400.

Request URL: http://127.0.0.1:9000/apisix/admin/routes?label=a%3A1%2C&page=1&page_size=20
Request Method: GET
Status Code: 400 Bad Request
Response: {"code":10000,"message":"malformed label: \"a:1,\"","data":null,"request_id":"23661bdf-dbd4-47f1-9a7c-d0c5783a4cbe"}

How to Reproduce

image

@idbeta idbeta added the bug Something isn't working label Jan 4, 2021
@starsz
Copy link
Contributor

starsz commented Jan 4, 2021

@juzhiyuan. If only one label, it shouldn't contain ",".

Like this:
http://127.0.0.1:9000/apisix/admin/routes?label=a:1&page=1&page_size=20

And this:
http://127.0.0.1:9000/apisix/admin/routes?label=a:1,b:1&page=1&page_size=20

cc @LiteSun

@juzhiyuan juzhiyuan added this to the 2.3 milestone Jan 4, 2021
@LiteSun
Copy link
Member

LiteSun commented Jan 4, 2021

OK, I'll fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants