File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,6 @@ struct Headers(Formattable, Stringable):
9898 # TODO (bgreni): Handle possible trailing whitespace
9999 var value = r.read_line()
100100 self ._inner[to_string(key^ ).lower()] = to_string(value^ )
101-
102101 return (to_string(first^ ), to_string(second^ ), to_string(third^ ))
103102
104103 fn format_to (self , inout writer : Formatter):
Original file line number Diff line number Diff line change @@ -87,7 +87,6 @@ struct MojoClient(Client):
8787 port = 443
8888 else :
8989 port = 80
90-
9190 var conn = create_connection(self .fd, host_str, port)
9291 var bytes_sent = conn.write(encode(req^ ))
9392 if bytes_sent == - 1 :
@@ -104,5 +103,5 @@ struct MojoClient(Client):
104103 except e:
105104 conn.close()
106105 raise e
107-
106+
108107 return HTTPResponse(Bytes())
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ from tests.utils import (
55from lightbug_http.sys.client import MojoClient
66from lightbug_http.http import HTTPRequest, encode
77from lightbug_http.uri import URI
8- from lightbug_http.header import Header
8+ from lightbug_http.header import Header, Headers
99from lightbug_http.io.bytes import bytes
1010
1111
@@ -16,9 +16,11 @@ def test_client():
1616
1717fn test_mojo_client_lightbug_external_req (client : MojoClient) raises :
1818 var req = HTTPRequest(
19- uri = URI .parse(" httpbin.org/status/200" )[URI ],
20- headers = Header(" Connection" , " keep-alive" ),
21- protocol = " GET" ,
19+ uri = URI .parse(" http://httpbin.org/status/200" )[URI ],
20+ headers = Headers(
21+ Header(" Connection" , " keep-alive" ),
22+ Header(" Host" , " httpbin.org" )),
23+ method = " GET" ,
2224 )
2325
2426 try :
You can’t perform that action at this time.
0 commit comments