mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
If no content is returned, Rack throws an error:
/Users/matt/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/lint.rb: in assert, line 19 /Users/matt/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/lint.rb: in check_content_type
This commit is contained in:
parent
93adb17437
commit
38ac842886
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ module Sidekiq
|
|||
def call(env)
|
||||
# Solve the problem of people requesting /sidekiq when they need to request /sidekiq/ so
|
||||
# that relative links in templates resolve correctly.
|
||||
return [301, { 'Location' => "#{env['SCRIPT_NAME']}/" }, []] if env['SCRIPT_NAME'] == env['REQUEST_PATH']
|
||||
return [301, { 'Location' => "#{env['SCRIPT_NAME']}/" }, ['redirecting']] if env['SCRIPT_NAME'] == env['REQUEST_PATH']
|
||||
|
||||
return @app.call(env) unless @matcher =~ env["PATH_INFO"]
|
||||
env['PATH_INFO'].sub!(@matcher,'')
|
||||
|
|
Loading…
Add table
Reference in a new issue