summaryrefslogtreecommitdiff
path: root/websocket/_http.py
Commit message (Collapse)AuthorAgeFilesLines
* use str.format() from PEP 3101engn33r2023-04-081-4/+4
|
* revert fc525b1, http proxy uses URL port unlike SOCKS proxiesengn33r2022-08-251-6/+6
|
* Fix bug that set http proxy to port 80engn33r2022-08-251-6/+6
|
* Allow passing `http_proxy_timeout` to `run_forever`. (#842)Adam Wojtczak2022-08-241-2/+2
| | | | | | | | | | * Allow passing `http_proxy_timeout` to `run_forever` * Normalize docstring * fix flake8 lint Co-authored-by: Adam Wojtczak <adam.wojtczak@cybercare.cc> Co-authored-by: engn33r <engn33r@users.noreply.github.com>
* Fix unclosed socket when 'error.errno in eConnRefused'. (#826)bvd02022-06-011-3/+2
|
* Update copyright year to 2022engn33r2021-12-311-1/+1
|
* Add errno.ENETUNREACH to _http.py retry loopengn33r2021-12-301-2/+2
| | | Based on code from issue 522 and information gathered from issues 764 and 775
* Remove EINTR branch from PR #528. PEP 475 handles Python 3.5+engn33r2021-12-131-3/+1
| | | | When PR #528 was submitted, older versions of Python were supported. Now only Python 3.6+ is supposed, so we can rely on PEP 475
* add support to pass custom ssl.SSLContext into sslopt param (#762)Chris Wheeler2021-11-261-9/+9
|
* Remove HAVE_CONTEXT_CHECK_HOSTNAME var, edit check_hostname logic after ↵engn33r2021-11-261-10/+12
| | | | PROTOCOL_TLS_CLIENT switch
* Fix testConnect test case with tuple of errorsengn33r2021-11-261-27/+29
|
* Fix #760 Replace deprecated ssl.PROTOCOL_TLS with ssl.PROTOCOL_TLS_CLIENTengn33r2021-11-221-1/+1
|
* Py2->3: simplify class definition (#750)谭九鼎2021-10-201-1/+1
| | | Remove implied and redundant object class type declarations
* Fix python-socks dependency and replace echo.websocket.org in testsengn33r2021-08-111-0/+9
| | | | | | | | The recent addition of python-socks required it to be a dependency. This was mentioned in #728. Additional changes were made to prevent python-socks from becoming a required dependency for every install, so now it is only required for SOCKS proxy usage. Additionally, because echo.websockets.org was experiencing downtime issues during this fix, echo.websockets.org was replaced in unit tests with a local echo server from the Python websockets library. This should speed up tests, avoid test errors cause by external website downtime, and reduce traffic to echo.websocket.org caused by this project.
* Transition from LGPL 2.1 license to Apache 2.0 - fix #697engn33r2021-08-101-13/+11
|
* Revert #417 and reimplement proxy support with python-socksengn33r2021-08-101-42/+46
| | | | | | | | | | | | Due to the ongoing license change process in #697, PR #417 from @jhtitor needed to be removed. PR #417 added SOCKS proxy support using PySocks, which is the most popular Python SOCKS proxy and is used by libraries such as 'requests' and 'urllib3'. However, as of mid-2021, PySocks has not seen any activity since Sep 2019 and has several open issues. Because PySocks does not appear to be maintained and has no forks that are actively trying to replace the old repository, python-socks may be a better choice going forward. Although python-socks is a newer project, it has good code coverage and recent commits from earlier this year (2021).
* Replace deprecated ssl.PROTOCOL_SSLv23 with ssl.PROTOCOL_TLSengn33r2021-06-031-1/+1
|
* Add sslopt 'server_hostname' to be able to pass SNI check when connecting by ↵wildraid2021-05-311-0/+3
| | | | IP address (#698)
* Cast proxy_port to int from strengn33r2021-05-301-1/+1
| | | Without casting to an int, will encounter `TypeError: an integer is required (got type str)` when using PySocks 1.7.1 to connect to a SOCKS proxy like shadowsocks (see issue #696)
* Improve _abnf.py and _http.py test coverageengn33r2021-05-161-2/+1
|
* Remove unnecessary Python2 codeengn33r2021-05-151-10/+1
|
* Fix: ResourceWarning unclosed socket (#690)rmkraeuchi2021-05-151-0/+2
| | | Close socket if error occurs during opening socket
* Improve test coverage of _http.pyengn33r2021-05-061-5/+4
|
* First pass removing Python 2 code, mostly six dependencyengn33r2021-05-041-7/+2
|
* PEP8 style compliance fixesengn33r2021-05-041-9/+10
|
* Fix #649 case of multiple set-cookie response headersengn33r2021-04-261-1/+4
|
* uses HTTP/1.1 for connect method (#677)GtTmy2021-04-191-1/+3
| | | and add Host header for proxy connections
* Fix #526 by reverting invalid BSD license migration in commit e94ed9e to ↵engn33r2021-02-221-2/+1
| | | | return to LGPL2.1
* Merge branch 'master' into masterliris2019-12-251-2/+5
|\
| * Merge pull request #573 from devmonkey22/masterliris2019-12-251-5/+4
| |\ | | | | | | Resolve issue opening socket to intranet on Windows 10 with no proxy settings but behind proxy
| | * Resolve issue opening socket to intranet on Windows 10 with no proxy ↵Mike D2019-09-161-5/+4
| | | | | | | | | | | | | | | settings but behind proxy Fix for #571. Always provide `socket.SOCK_STREAM` to `socket.getaddrinfo`.
| * | Fix getting 400 bad request with long proxy authorization stringtruong.hua2019-12-021-1/+1
| |/
* | Pep8 fixesazaugg2019-04-241-1/+2
|/
* Merge pull request #528 from trygveaa/fix-interrupted-system-callliris2019-02-231-16/+22
|\
| * Retry connect on "Interrupted system call"Trygve Aaberge2019-02-201-16/+22
| | | | | | | | | | | | | | | | | | When connecting to a socket, EINTR ("Interrupted system call") may be raised if the application receives a signal at the same time. Prior to Python 3.5, applications has to handle this themselves by retrying the connection. For more details, see https://www.python.org/dev/peps/pep-0475/ Fixes #527
* | fixed errorliris2019-02-231-1/+2
|/
* fixed #497 proxy issuev0.54.0liris2018-11-011-1/+1
|
* Miscellaneous code cleanupInstance2018-09-221-1/+1
|
* Merge pull request #427 from element-82/masterliris2018-05-271-1/+5
|\ | | | | _http.py: fix windows proxy error due to socktype
| * _http.py: fix windows proxy error due to socktypePaul Barrette2018-05-041-1/+5
| | | | | | | | | | | | | | | | | | | | Resolves #426 When running on windows 10 with a proxy, there is a connect error: _on_error: exception Socket type must be stream or datagram, not 0 This commit fixes that issue. Signed-off-by: Paul Barrette <paulbarrette@gmail.com>
* | Merge pull request #417 from jhtitor/masterliris2018-05-271-1/+56
|\ \ | | | | | | socks5 via pysocks support
| * | Add pysocks support.jhtitor2018-03-301-1/+56
| |/
* | Merge pull request #415 from minus7/masterliris2018-05-271-8/+11
|\ \ | | | | | | Load system default certificates if none are given
| * | Remove bundled cacert.pemminus2018-03-211-7/+5
| | |
| * | Check if SSLContext supports loading default certsminus2018-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | This changes behavior. When creating a TLS connection, not specifying cacert/capath and while on a Python version without load_default_certs, creating the socket will not fail as before, but verifying the connection will fail instead.
| * | Load system default certificates if none are givenminus2018-03-211-1/+6
| |/
* | Merge pull request #409 from hugobordigoni/masterliris2018-05-271-1/+1
|\ \ | | | | | | fix #408
| * | fix #408Hugo Bordigoni2018-03-011-1/+1
| |/
* | Fix the issue that websocket status message may not presentKevin Wang2018-02-221-1/+2
|/
* Added status message when HTTP can't be upgraded to WSDmitry Mottl2018-02-141-2/+4
|