1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

6 commits

Author SHA1 Message Date
Steve Klabnik
afb053b4d3 Respect absolute paths in compute_source_path.
When using compute_source_path to determine the full path of an
asset, if our source begins with '/', we don't want to include
the directory. Examples are illustrative:

> compute_source_path("foo", "stylesheets", "css")
=> "/Users/steve/src/my_app/public/stylesheets/foo.css"
> compute_source_path("/foo", "stylesheets", "css")
=> "/Users/steve/src/my_app/public/foo.css"

Before this patch, the second example would return the same as the
first.

Fixes #5680.
2012-06-16 18:06:15 +02:00
Andrew White
1ef12fd172 Remove fixture files with Windows incompatible filenames
Windows doesn't allow `\ / : * ? " < > |` in filenames so create
the fixture files at runtime and ignore the incompatible ones when
running on Windows.
2012-02-20 04:46:45 +00:00
Andrew White
ceb288b8ce Fix ActionDispatch::Static to serve files with unencoded PCHAR
RFC 3986[1] allows sub-delim characters in path segments unencoded,
however Rack::File requires them to be encoded so we use URI's
unescape method to leave them alone and then escape them again.

Also since the path gets passed to Dir[] we need to escape any glob
characters in the path.

[1]: http://www.ietf.org/rfc/rfc3986.txt
2012-02-17 14:07:48 +00:00
Sergey Nartimov
d07b2f3e29 escape static file path to prevent double unescaping 2012-02-16 21:50:07 +03:00
kennyj
1ec5c2674f Add testcase for non english filename. Related to #2982. 2012-02-05 22:34:29 +09:00
Joshua Peek
ef58194129 Move Rails::Static into ActionDispatch 2009-09-26 11:37:42 -05:00