googleinterns / step23-2020

Apache License 2.0
3 stars 5 forks source link

Fix servlet subpath routing #131

Closed bsidhom closed 4 years ago

bsidhom commented 4 years ago

Using regex serving paths seems to fix servlet resolution. I'm not sure why, but it's possible that * matches all characters (including path separators) in standard path syntax.

Create-visit requests fail for me due to Maps not accepting the API key, but routing seems to be fixed.

bsidhom commented 4 years ago

Turns out that serveRegex ultimately translates into a Matcher.matches() call. In other words, the regexes have implicit anchors at both ends.

I'll add one more servlet that captures all bad request paths and returns an error in a follow-up.