Changeset 1756 for hive

Show
Ignore:
Timestamp:
08/20/08 16:18:20 (3 months ago)
Author:
dbryson
Message:


Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • hive/trunk/data_webapp/lib/worker_bee_authorization.rb

    r1750 r1756  
    3232  # Verify the incoming request 
    3333  def valid_signed_request? 
    34     auth_headers = request.headers["AUTHORIZATION"] 
     34    auth_headers = request.headers["HTTP_AUTHORIZATION"] 
     35    return false unless auth_headers 
     36     
    3537    method = request.method.to_s.upcase 
    36     date = request.headers["DATE"] 
     38    date = request.headers["HTTP_DATE"] 
    3739    path = request.path 
    38     contentType = request.content_type 
     40    contentType = request.headers["HTTP_CONTENT_TYPE"] 
    3941     
    4042    pieces = auth_headers.split(":") 
     
    5355  def sign_request(sk,method,path,date,content_type) 
    5456    data = [method,path,date,content_type].join("\n") 
    55     #puts "Controller signing: #{data}\n" 
     57    puts "Controller signing: #{data}\n" 
    5658    digest   = OpenSSL::Digest::Digest.new('sha1') 
    5759    Base64.encode64(OpenSSL::HMAC.digest(digest, sk, data.to_s))