class HTTParty::Request

def handle_unauthorized(&block)

def handle_unauthorized(&block)
  return unless digest_auth? && response_unauthorized? && response_has_digest_auth_challenge?
  return if @credentials_sent
  @credentials_sent = true
  perform(&block)
end