Permalink
Browse files

Merge pull request #61 from as016194/master

Error out on redirects.

Sane/Valid redirects will be followed by http_client anyway.
  • Loading branch information...
2 parents b515d53 + c553ce6 commit a079123d1bc20de2c071ff126501da404b630e42 @tomlea tomlea committed Apr 5, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/geminabox_client.rb
@@ -28,7 +28,7 @@ def url_for(path)
def push(gemfile)
response = http_client.post(url_for(:upload), {'file' => File.open(gemfile, "rb")}, {'Accept' => 'text/plain'})
- if response.status < 400
+ if response.status < 300
response.body
else
raise GeminaboxClient::Error, "Error (#{response.code} received)\n\n#{response.body}"

0 comments on commit a079123

Please sign in to comment.