Permalink
Browse files

We're looking for env['HTTP_AUTHORIZATION'], not headers['Authorizati…

…on']
  • Loading branch information...
1 parent c6030db commit ffc6e8db55b1e992f5820deee02de129f1742308 @laserlemon laserlemon committed Apr 23, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 gemwhisperer.rb
View
@@ -58,10 +58,10 @@ class Whisper < ActiveRecord::Base
Log.info "parsed json: #{hash.inspect}"
authorization = Digest::SHA2.hexdigest(hash['name'] + hash['version'] + ENV['RUBYGEMS_API_KEY'])
- if headers['Authorization'] == authorization
- Log.info "authorized: #{headers['Authorization']}"
+ if env['HTTP_AUTHORIZATION'] == authorization
+ Log.info "authorized: #{env['HTTP_AUTHORIZATION']}"
else
- Log.info "unauthorized: #{headers['Authorization']}"
+ Log.info "unauthorized: #{env['HTTP_AUTHORIZATION']}"
error 401
end

0 comments on commit ffc6e8d

Please sign in to comment.