From fa5ac678fc628775a4c65a19bbaea02ef05b25dc Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 9 Oct 2016 19:36:04 +0300 Subject: examples/network/http_client*: Use \r\n line-endings in request. --- examples/network/http_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/network/http_client.py') diff --git a/examples/network/http_client.py b/examples/network/http_client.py index df66ace2a5..b245a721ac 100644 --- a/examples/network/http_client.py +++ b/examples/network/http_client.py @@ -18,10 +18,10 @@ def main(use_stream=False): # MicroPython socket objects support stream (aka file) interface # directly, but the line below is needed for CPython. s = s.makefile("rwb", 0) - s.write(b"GET / HTTP/1.0\n\n") + s.write(b"GET / HTTP/1.0\r\n\r\n") print(s.readall()) else: - s.send(b"GET / HTTP/1.0\n\n") + s.send(b"GET / HTTP/1.0\r\n\r\n") print(s.recv(4096)) s.close() -- cgit v1.2.3