Skip to content

Commit

Permalink
Using 403's for bad indexes instead so the request doesn't drop down …
Browse files Browse the repository at this point in the history
…to Rails
  • Loading branch information
qrush committed Oct 14, 2009
1 parent 7cace81 commit 4fc3695
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/metal/hostess.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def serve(path, redirect = false)

["/yaml", "/Marshal.4.8"].each do |old_index|
get old_index do
halt 404, "Please update your RubyGems. Run: gem update --system"
halt 403, "Please update your RubyGems. Run: gem update --system"
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/unit/hostess_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def remove(path)
["/yaml", "/Marshal.4.8"].each do |old_index|
should "not serve up #{old_index}" do
get old_index
assert_equal 404, last_response.status
assert_equal 403, last_response.status
assert_match /gem update --system/, last_response.body
end
end
Expand Down

0 comments on commit 4fc3695

Please sign in to comment.