ant0ine / go-json-rest

A quick and easy way to setup a RESTful JSON API
https://ant0ine.github.io/go-json-rest/
MIT License
3.51k stars 381 forks source link

URL's with unencoded periods do not match routes #219

Closed snagles closed 6 years ago

snagles commented 7 years ago

Most url encoders do not encode periods, causing a 404 returned in the situation below:

http://example/location/St.+Augustine rest.Get("location/:location, handler)

The route matches with the period's encoded, but most languages urlencode function does not encode the period since it is valid.

snagles commented 6 years ago

For reference:

You need to use the relaxed placeholder "#" found in the documentation. I missed it.