# File lib/client.rb, line 344
  def self.head_container(url, token, container, http_conn=nil)
    if not http_conn
      http_conn = http_connection(url)
    end
    parsed = http_conn[0].clone
    conn = http_conn[1]
    
    conn.start if !conn.started?
    parsed.path += "/#{quote(container)}"
    resp = conn.head(parsed.request_uri, {'x-auth-token' => token})
    if resp.code.to_i < 200 or resp.code.to_i > 300
      raise ClientException.new('Container HEAD failed', :http_scheme=>parsed.scheme,
                  :http_host=>conn.address, :http_port=>conn.port,
                  :http_path=>parsed.path, :http_status=>resp.code,
                  :http_reason=>resp.message)
    end
    resp_headers = {}
    resp.header.each do |k,v|
      resp_headers[k.downcase] = v
    end
    resp_headers
  end