File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,10 @@ def main(use_stream=False):
1818 # MicroPython socket objects support stream (aka file) interface
1919 # directly, but the line below is needed for CPython.
2020 s = s .makefile ("rwb" , 0 )
21- s .write (b"GET / HTTP/1.0\n \n " )
21+ s .write (b"GET / HTTP/1.0\r \n \r \n " )
2222 print (s .readall ())
2323 else :
24- s .send (b"GET / HTTP/1.0\n \n " )
24+ s .send (b"GET / HTTP/1.0\r \n \r \n " )
2525 print (s .recv (4096 ))
2626
2727 s .close ()
Original file line number Diff line number Diff line change @@ -24,12 +24,12 @@ def main(use_stream=True):
2424 if use_stream :
2525 # Both CPython and MicroPython SSLSocket objects support read() and
2626 # write() methods.
27- s .write (b"GET / HTTP/1.0\n \n " )
27+ s .write (b"GET / HTTP/1.0\r \n \r \n " )
2828 print (s .read (4096 ))
2929 else :
3030 # MicroPython SSLSocket objects implement only stream interface, not
3131 # socket interface
32- s .send (b"GET / HTTP/1.0\n \n " )
32+ s .send (b"GET / HTTP/1.0\r \n \r \n " )
3333 print (s .recv (4096 ))
3434
3535 s .close ()
You can’t perform that action at this time.
0 commit comments