fix work from before
This commit is contained in:
parent
caf56c0fda
commit
98b532484b
1 changed files with 4 additions and 10 deletions
|
@ -19,15 +19,9 @@ class FakeTunnelConnector
|
||||||
end
|
end
|
||||||
response = read_socket(tcp_socket)
|
response = read_socket(tcp_socket)
|
||||||
location = response[:start_line][:location]
|
location = response[:start_line][:location]
|
||||||
verb = response[:start_line][:verb]
|
|
||||||
if verb == 'POST'
|
|
||||||
tcp_socket.print('test')
|
|
||||||
close_connection(tcp_socket)
|
|
||||||
else
|
|
||||||
write_response(tcp_socket, location)
|
write_response(tcp_socket, location)
|
||||||
close_connection(tcp_socket)
|
close_connection(tcp_socket)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
def ssl_server
|
def ssl_server
|
||||||
OpenSSL::SSL::SSLServer.new server, ssl_context if ssl_context
|
OpenSSL::SSL::SSLServer.new server, ssl_context if ssl_context
|
||||||
|
@ -105,7 +99,7 @@ class FakeTunnelConnector
|
||||||
elsif location == '/session'
|
elsif location == '/session'
|
||||||
login
|
login
|
||||||
else
|
else
|
||||||
login
|
ok
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -131,6 +125,6 @@ class FakeTunnelConnector
|
||||||
|
|
||||||
def login
|
def login
|
||||||
body = '{"token":"3b51619a125d90cd0778bd4c02cd7be34de6dc9268eecd25"}'
|
body = '{"token":"3b51619a125d90cd0778bd4c02cd7be34de6dc9268eecd25"}'
|
||||||
ok(body) + "\r\n"
|
ok(body)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue