Paul Sokolovsky
a2647e316e
urllib.urequest: Be sure to create socket with params returned by getaddrinfo().
...
To use address as returned by getaddrinfo(), we should create a socket
compatible with address family, etc., returned by the same call alongside
the address itself.
2018-01-23 00:26:38 +02:00
Paul Sokolovsky
469e029dd2
urllib.urequest: Support HTTP reply lines without textual description.
...
E.g. "HTTP/1.1 500". RFC7230 seems to formally require at least a space
after the numeric code, but it was reported that some software sends
lines like above nonetheless.
Ref: https://github.com/micropython/micropython-lib/issues/247
2018-01-14 11:40:11 +02:00
Paul Sokolovsky
b715ee0cb8
urllib.urequest: If error happens while parsing response headers, close socket.
...
Because otherwise, user doesn't get any response object, so cannot close
socket, and it leaks.
2017-09-12 08:43:38 +03:00
Paul Sokolovsky
633f030d6f
urllib.urequest: Add server_hostname param to ussl.wrap_socket() call.
2017-06-14 18:31:16 +03:00
Paul Sokolovsky
cf591cf2c6
urllib.urequest: Fix stale variable name (line -> l).
2016-12-08 14:31:25 +03:00
Paul Sokolovsky
d036673d7b
urllib.urequest: Avoid allocating memory when issuing request.
...
Memory will still be allocated when parsing response, but this already
saves 164 bytes of memory traffic (x64).
2016-06-11 00:25:16 +03:00
Paul Sokolovsky
52ac454ef7
urllib.urequest: Avoid allocating long semi-duplicate strings.
2016-06-11 00:05:24 +03:00
Paul Sokolovsky
880c6a7011
urllib.urequest: Add support for HTTPS.
2016-05-30 21:24:41 +03:00
Paul Sokolovsky
413bebf6c8
urllib.urequest: Support explicit port number in a URL.
2016-05-25 00:05:10 +03:00
Paul Sokolovsky
8506e36466
urllib.urequest: PEP8 fix.
2016-04-16 21:30:54 +03:00
Paul Sokolovsky
ee49bab877
urllib.urequest: Support arbitrary HTTP methods on urlopen() level.
...
This is extension to CPython (CPython does this via Request class).
2016-03-14 09:49:16 +07:00
Paul Sokolovsky
9ca12f5ca2
urllib.urequest: Support POST method (when data param isn't None).
2016-03-02 22:54:46 +02:00
Paul Sokolovsky
de50429b1a
urllib.urequest: Add absolutely minimal urlopen() implementation.
...
Optimized for low-memory bare-metal systems.
2015-11-21 02:25:31 +02:00