Skip to content

Instantly share code, notes, and snippets.

@brynary
Created April 23, 2009 18:23
Show Gist options
  • Save brynary/100660 to your computer and use it in GitHub Desktop.
Save brynary/100660 to your computer and use it in GitHub Desktop.
@response = Rack::Response.new(body, status, headers)
if @response.redirect? && options["rack-bug.intercept_redirects"]
intercept_redirect
return @response.to_a
elsif modify?
inject_toolbar
return @response.to_a
else
return [status, headers, body]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment