gma / nesta

File Based CMS and Static Site Generator
http://nestacms.com
MIT License
902 stars 120 forks source link

Use request.path_info when determining the selected page. #156

Closed jkowens closed 6 years ago

jkowens commented 9 years ago

Fixes gma/nesta#112.

This just implements the fix noted by @ms. Using request.path_info is the correct method because it ignores the SCRIPT_NAME environment variable that gets set when a Sinatra app is mapped to a path other than "/".

I think other than proving it doesn't break existing functionality, adding a test to show that SCRIPT_NAME is in fact ignored is all that is really needed.

gma commented 6 years ago

@jkowens When I noticed you'd closed this, and I'd never even commented on it, I was mortified. I'm so sorry.

Thanks very much for doing it though - I've just ported the tests to the new test suite and merged the result to master.

jkowens commented 6 years ago

@gma hey no hard feelings 😄

Thanks for the update!