add one more crlf

This commit is contained in:
kenna-bmcdevitt 2020-07-22 07:16:44 -05:00
parent cb27eaa8d6
commit c052fb833f

View file

@ -5,7 +5,7 @@ require 'time'
class FakeTunnelConnector class FakeTunnelConnector
attr_accessor :port, :server, :ssl_context attr_accessor :port, :server, :ssl_context
CRLF = "\r\n" CRLF = "\r\n".freeze
def initialize(port, ssl_context = nil) def initialize(port, ssl_context = nil)
@port = port @port = port
@ -91,7 +91,7 @@ class FakeTunnelConnector
end end
def ok_headers def ok_headers
"HTTP/1.1 200 OK\r\n" + "HTTP/1.1 200 OK#{CRLF}" +
"Date: #{Time.now.utc}#{CRLF}" + "Date: #{Time.now.utc}#{CRLF}" +
CRLF CRLF
end end
@ -128,6 +128,6 @@ class FakeTunnelConnector
def login def login
body = '{"token":"3b51619a125d90cd0778bd4c02cd7be34de6dc9268eecd25"}' body = '{"token":"3b51619a125d90cd0778bd4c02cd7be34de6dc9268eecd25"}'
ok(body) ok(body)
end end
end end