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

18 commits

Author SHA1 Message Date
SHIBATA Hiroshi
a09c07890a use File.exist? instead of File.exists? 2014-02-09 17:39:55 +09:00
Mikko Johansson
ccd1c435ee Skips tests on Windows that create files with illegal characters 2014-02-09 02:02:44 +02:00
Gaurish Sharma
35e56f6fa5 standardize on jruby_skip & rbx_skip
This Adds helpers(jruby_skip & rbx_skip). In Future, Plan is to use
these helpers instead of calls directly to
RUBY_ENGINE/RbConfig/JRUBY_VERSION
2014-01-13 19:51:47 +05:30
Andrew White
436ed51711 Fix Encoding::CompatibilityError when public path is UTF-8
In #5337 we forced the path encoding to ASCII-8BIT to prevent static
file handling from blowing up before an application has had chance to
deal with possibly invalid urls. However this has a negative side
effect of making it an incompatible encoding if the application's
public path has UTF-8 characters in it.

To work around the problem we check to see if the path has a valid
encoding once it has been unescaped. If it is not valid then we can
return early since it will not match any file anyway.

Fixes #13518
2013-12-29 18:38:53 +00:00
Kuldeep Aggarwal
fc32b7f99b skiping => skipping 2013-11-19 03:08:08 +05:30
Gaurish Sharma
5122bbb3c2 Skip test which is broken on jruby
This test is broken from quite a while & is expected to remain broken as
encoding issues are hardest to fix in JRuby. so lets skip this test for
now
2013-11-09 02:36:24 +05:30
Andrew White
af73e3cb15 Revert "Invert precedence of content in ActionDispatch::Static"
This reverts commit c59734f756.
2012-12-07 06:02:43 +00:00
Andrew White
c59734f756 Invert precedence of content in ActionDispatch::Static
This commit inverts the precedence in ActionDispatch::Static so that
dynamic content will be served before static content. This is so that
precompiled assets do not inadvertently get included when running in
development mode - it should have no effect in production where static
files are usually handled by the web server.

Closes #6421
2012-12-06 17:20:53 +00:00
Michael Reinsch
7d5fbf846b fix ArgumentError being raised in case of invalid byte sequences 2012-03-08 20:41:25 +09: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
José Valim
e1c1685016 Static middleware accepts cache control. 2011-05-03 12:32:14 +02:00
José Valim
d5ad92ced1 Make static faster as we don't have to serve multiple paths anymore. 2011-04-15 20:09:39 +02:00
José Valim
0b51f3cc73 Ensure the proper content type is returned for static files. 2010-10-04 18:06:04 +02:00
Piotr Sarnacki
401cd97923 Modified ActionDispatch::Static to allow passing multiple roots 2010-09-03 22:59:09 +02:00
Joshua Peek
ef58194129 Move Rails::Static into ActionDispatch 2009-09-26 11:37:42 -05:00
Renamed from railties/test/rack_static_test.rb (Browse further)