# File lib/ftw/agent.rb, line 189 def upgrade!(uri, protocol, options={}) req = request("GET", uri, options) req.headers["Connection"] = "Upgrade" req.headers["Upgrade"] = protocol response = execute(req) if response.status == 101 # Success, return the response object and the connection to hand off. return response, response.body else return response, nil end end