adjusted scan names and owner
This commit is contained in:
parent
d288e039f9
commit
b07e6dfc55
1 changed files with 6 additions and 3 deletions
|
@ -4,6 +4,9 @@ require 'time'
|
||||||
|
|
||||||
class FakeTunnelConnector
|
class FakeTunnelConnector
|
||||||
attr_accessor :port, :server, :ssl_context
|
attr_accessor :port, :server, :ssl_context
|
||||||
|
|
||||||
|
CRLF = "\r\n"
|
||||||
|
|
||||||
def initialize(port, ssl_context = nil)
|
def initialize(port, ssl_context = nil)
|
||||||
@port = port
|
@port = port
|
||||||
@server = TCPServer.open(port)
|
@server = TCPServer.open(port)
|
||||||
|
@ -43,7 +46,7 @@ class FakeTunnelConnector
|
||||||
puts 'Request Headers:'
|
puts 'Request Headers:'
|
||||||
puts '-------------------'
|
puts '-------------------'
|
||||||
puts headers
|
puts headers
|
||||||
puts "\r\n"
|
puts CRLF
|
||||||
{ start_line: start_line, headers: headers }
|
{ start_line: start_line, headers: headers }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -89,8 +92,8 @@ class FakeTunnelConnector
|
||||||
|
|
||||||
def ok_headers
|
def ok_headers
|
||||||
"HTTP/1.1 200 OK\r\n" +
|
"HTTP/1.1 200 OK\r\n" +
|
||||||
"Date: #{Time.now.utc}\r\n" +
|
"Date: #{Time.now.utc}#{CRLF}" +
|
||||||
"\r\n"
|
CRLF
|
||||||
end
|
end
|
||||||
|
|
||||||
def route_request(location)
|
def route_request(location)
|
||||||
|
|
Loading…
Add table
Reference in a new issue