Open zd-project opened 6 years ago
I'm not sure redirect
works within path
.
What is the design decision behind this? It sounds counterintuitive to me if it doesn't support path
It's more of a bug than a design decision (if it doesn't).
It looks to me the pattern matching algorithm might be the reason. I don't understand why it's the case but the path regex has to start with a slash, e.g., "/*". Otherwise the bug occurs. I remember I read about this in some other posts as well.
http://sparkjava.com/documentation#redirects, method doesn't seem to work when I try to add the trailing slash, e.g.,
Server fails to recognize the redirect. It confuses me because it seems under the hood redirect.get calls the same helper functions get calls.
I'm able to get away with this. https://stackoverflow.com/questions/34753001/spark-framework-match-with-or-without-trailing-slash
Can anyone give some explanations?