StrictSlash does not allow to handle error404 #573
Conversation
Signed-off-by: Mohamed Ashiq Liyazudeen <mliyazud@redhat.com>
|
please test this @obnoxxx |
|
review @heketi/dev |
|
Can one of the admins verify this patch? |
|
What issue does this handle? Are we aiming to return 404 for /hello/, for example? |
|
I'll have a look at the tests and see if I can come up with anything. For THIS PR, however, I recommend you amend to reference PR 548 in the commit message. |
|
@centos-ci test this, please |
|
@MohamedAshiqrh indeed, I think we need a better commit message, explaining what the problem is and referencing PR #548 . Still wondering why the unit tests for PR #548 work... |
|
The tests pass because they are only testing leaf items, or however they're called. In particular, they're only testing that we return 404 on clusters, nodes, and volumes that don't exist. So we test /clusters/xxx (which doesn't exist), but we don't test, for example, what happens when you go to /clusters/ as opposed to /clusters. Currently /clusters/ just redirects you to /clusters, which I don't think is a bad idea. With that in mind, I would need a stronger case for this PR before saying we should merge it. |
|
Running the latest heketi container image in Kubernetes, I'm seeing the following behavior: This is without @MohamedAshiqrh's patch, and it seems to show the behavior we're looking for already. Is there some other behavior that we're looking to correct? |
|
@jarrpa this actually matches my expectation and understanding of the code. Thanks for testing! |
|
My Bad, the build was missing the commit. even with out this change and only with that commit this works. Sorry for misleading thoughts. |
Signed-off-by: Mohamed Ashiq Liyazudeen mliyazud@redhat.com