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
Problem updating a strategy parameter when it contains a comma using actuator with TogglzEndpoint #1109
Comments
Hey @rocastaneda When I add an IP via console and use curl then: curl -d '{"name":"REVERSE_GREETING", "enabled":"true", "strategy": "server-ip"}' -H "Content-Type: application/json" -POST http://localhost:8082/actuator/togglz/REVERSE_GREETING then I am getting the expected response containing the IP. But when I then try to Post the same IP again: curl -d '{"name":"REVERSE_GREETING","enabled":false,"strategy":"server-ip","params":{"ips":"192.168.178.1"}' -H "Content-Type: application/json" -POST http://localhost:8082/actuator/togglz/REVERSE_GREETING Then I am also getting a HTTP 400 Bad Request. In general this should work. There is also a Test for it and it is also working in console. So I would say this is something I should do on my togglz-site so everyone can use it the way you want it to use. There are some tests out there containing your case already, but not an integration test including the actuator stuff. I remember that the actuator stuff is a bit "bitchy" .. Will dive into it. Thanks for raising this issue :-) I hope you are still able to work with togglz even when this issue is there? |
I just created a custom actuator endpoint and am testing it with some curl requests: curl -d '{ version: "1.0" }' -H "Content-Type: application/json" -X POST http://localhost:8080/actuator/custom This one leads to a HTTP Bad Request response. There is no hint that the json object is invalid. It just responds with Bad Request. While this one leads to an "OK" (json is valid): and also this one containing a comma separated value leads to an "OK":
|
when trying to update a parameter of the strategy (IP Address Server) that contains a list separated by commas, it does not allow its update since the implementation for separating the parameters uses the comma character as delimiter.
TogglzEndpoint.java
In the implementation, it does not allow changing the delimiter for the separation of the parameters, always leaving the comma character as fixed.
If we view it from the console, it can be edited and consulted if there is a problem.
But when you want to update via a POST request using "actuator/togglz" a Bad Request error is generated.
Get Feature.
But when the POST call to the "/actuator/togglz" resource is generated, the Bad Request error is generated.
Could you tell me if this is really a bug or if there is any way to be able to carry out this update using the "actuator/togglz" resource?
The text was updated successfully, but these errors were encountered: