adafruit-circuitpython-httpserver 4.6.3__py3-none-any.whl → 4.7.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {adafruit_circuitpython_httpserver-4.6.3.dist-info → adafruit_circuitpython_httpserver-4.7.0.dist-info}/METADATA +1 -1
- {adafruit_circuitpython_httpserver-4.6.3.dist-info → adafruit_circuitpython_httpserver-4.7.0.dist-info}/RECORD +7 -7
- {adafruit_circuitpython_httpserver-4.6.3.dist-info → adafruit_circuitpython_httpserver-4.7.0.dist-info}/WHEEL +1 -1
- adafruit_httpserver/__init__.py +1 -1
- adafruit_httpserver/server.py +16 -3
- {adafruit_circuitpython_httpserver-4.6.3.dist-info → adafruit_circuitpython_httpserver-4.7.0.dist-info}/licenses/LICENSE +0 -0
- {adafruit_circuitpython_httpserver-4.6.3.dist-info → adafruit_circuitpython_httpserver-4.7.0.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
adafruit_circuitpython_httpserver-4.
|
|
2
|
-
adafruit_httpserver/__init__.py,sha256
|
|
1
|
+
adafruit_circuitpython_httpserver-4.7.0.dist-info/licenses/LICENSE,sha256=gyhZwtwoqSsDGoSrV4MrLpKKWyG_jE3eROTZp1EjIUM,1102
|
|
2
|
+
adafruit_httpserver/__init__.py,sha256=-f-sv_uTZ5BHiivlo5GM7ZTgEAp4UxdJ1_hLrQCwQ5w,1994
|
|
3
3
|
adafruit_httpserver/authentication.py,sha256=zBBFsAv3Qfl8meUjlS1jPQoSxhHWKNAPwbiS8MRagsg,2026
|
|
4
4
|
adafruit_httpserver/exceptions.py,sha256=tmOoUecGaSXY9kUIIV3Is5YoChrEIEJqVHl4QgmEvrg,1597
|
|
5
5
|
adafruit_httpserver/headers.py,sha256=8PnkazQmun6ARU9CQFdw6FVgSuqcZN9VMvU50F4hOec,4510
|
|
@@ -9,9 +9,9 @@ adafruit_httpserver/mime_types.py,sha256=rGNoC9kop2O3hAzMAppb3Qt6qH6VsF8l9NzsZ8J
|
|
|
9
9
|
adafruit_httpserver/request.py,sha256=uG4jfgruoknz41SYndV7wnDAXvTHAHoIk_z3IgLu80A,14823
|
|
10
10
|
adafruit_httpserver/response.py,sha256=H0I4RWXOiOUqDEX2Xvu_4NPD41CJJdbnycFfya52jFk,27532
|
|
11
11
|
adafruit_httpserver/route.py,sha256=C-2i1T_ykr2KAuDuREJ6P_1G5Llh3d-g0r_a1ETDMJc,6125
|
|
12
|
-
adafruit_httpserver/server.py,sha256=
|
|
12
|
+
adafruit_httpserver/server.py,sha256=3cy262jfSg8CWrSmmS9YhRo1dM9ecd_SKKhEMuhvcQ0,22409
|
|
13
13
|
adafruit_httpserver/status.py,sha256=YyMleWebUadx4dwJDldYoo9aLEPDd6NVdvB2w4uY7sk,1825
|
|
14
|
-
adafruit_circuitpython_httpserver-4.
|
|
15
|
-
adafruit_circuitpython_httpserver-4.
|
|
16
|
-
adafruit_circuitpython_httpserver-4.
|
|
17
|
-
adafruit_circuitpython_httpserver-4.
|
|
14
|
+
adafruit_circuitpython_httpserver-4.7.0.dist-info/METADATA,sha256=7RllRhBB7p348GzXa1qpp1ROzmBY3PC8BS755G6ODqc,4878
|
|
15
|
+
adafruit_circuitpython_httpserver-4.7.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
16
|
+
adafruit_circuitpython_httpserver-4.7.0.dist-info/top_level.txt,sha256=N8L9ONfZQ9bILxcOPVWXOjUDA-BNLPKFir7KqAbMQbA,20
|
|
17
|
+
adafruit_circuitpython_httpserver-4.7.0.dist-info/RECORD,,
|
adafruit_httpserver/__init__.py
CHANGED
adafruit_httpserver/server.py
CHANGED
|
@@ -13,7 +13,6 @@ except ImportError:
|
|
|
13
13
|
pass
|
|
14
14
|
|
|
15
15
|
from errno import EAGAIN, ECONNRESET, ETIMEDOUT
|
|
16
|
-
from ssl import SSLContext, create_default_context
|
|
17
16
|
from sys import implementation
|
|
18
17
|
from time import monotonic, sleep
|
|
19
18
|
from traceback import print_exception
|
|
@@ -34,8 +33,20 @@ from .response import FileResponse, Response
|
|
|
34
33
|
from .route import Route
|
|
35
34
|
from .status import BAD_REQUEST_400, FORBIDDEN_403, NOT_FOUND_404, UNAUTHORIZED_401
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
from ssl import
|
|
36
|
+
try:
|
|
37
|
+
from ssl import SSLContext, create_default_context
|
|
38
|
+
|
|
39
|
+
try: # ssl imports for C python
|
|
40
|
+
from ssl import (
|
|
41
|
+
CERT_NONE,
|
|
42
|
+
Purpose,
|
|
43
|
+
SSLError,
|
|
44
|
+
)
|
|
45
|
+
except ImportError:
|
|
46
|
+
pass
|
|
47
|
+
SSL_AVAILABLE = True
|
|
48
|
+
except ImportError:
|
|
49
|
+
SSL_AVAILABLE = False
|
|
39
50
|
|
|
40
51
|
|
|
41
52
|
NO_REQUEST = "no_request"
|
|
@@ -129,6 +140,8 @@ class Server:
|
|
|
129
140
|
self.https = https
|
|
130
141
|
|
|
131
142
|
if https:
|
|
143
|
+
if not SSL_AVAILABLE:
|
|
144
|
+
raise NotImplementedError("SSL not available on this platform")
|
|
132
145
|
self._validate_https_cert_provided(certfile, keyfile)
|
|
133
146
|
self._ssl_context = self._create_ssl_context(certfile, keyfile)
|
|
134
147
|
else:
|
|
File without changes
|