Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save loveky/5185871 to your computer and use it in GitHub Desktop.
Save loveky/5185871 to your computer and use it in GitHub Desktop.
Sinatra中request.path_info和request.script_name的区别

最近在看Sinatra 1.3.5的源码。在Sinatra::Helpers模块中看到一个名为uri的方法,用来将一个相对路径转换为绝对路径。在该函数的代码中看到分别针对request.script_name和request.path_info进行了处理。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment