def verify()
      send_bridge_request()
      begin
        line = gets()
        match = line.match(%r{^HTTP/1\.[01] ([0-9]{3,3}) (.*)$})
        if (!match)
          raise "HTTP BRIDGE error: bridge server sent incorrect reply to bridge request."
        end
        case code = match[1].to_i
        when 100, 101
          return true
  			when 401 # 401 Access Denied, key wasn't right.
  			  raise "HTTP BRIDGE error #{code}: host key was invalid or missing, but required."
  		  when 503, 504 # 503 Service Unavailable or 504 Gateway Timeout
  		    raise "HTTP BRIDGE error #{code}: could not verify server can handle requests because it's overloaded."
  	    else
  	      raise "HTTP BRIDGE error #{code}: #{match[2]} unknown error connecting to bridge server."
        end 
      ensure
        close() # once we do this, we just assume the connection is useless.
      end
    end
def verify()
      send_bridge_request()
      begin
        line = gets()
        match = line.match(%r{^HTTP/1\.[01] ([0-9]{3,3}) (.*)$})
        if (!match)
          raise "HTTP BRIDGE error: bridge server sent incorrect reply to bridge request."
        end
        case code = match[1].to_i
        when 100, 101
          return true
  			when 401 # 401 Access Denied, key wasn't right.
  			  raise "HTTP BRIDGE error #{code}: host key was invalid or missing, but required."
  		  when 503, 504 # 503 Service Unavailable or 504 Gateway Timeout
  		    raise "HTTP BRIDGE error #{code}: could not verify server can handle requests because it's overloaded."
  	    else
  	      raise "HTTP BRIDGE error #{code}: #{match[2]} unknown error connecting to bridge server."
        end 
      ensure
        close() # once we do this, we just assume the connection is useless.
      end
    end
This just tries to determine if the server will honor
 requests as specified above so that the TCPServer initializer
 can error out early if it won't.