CheeseAPI 0.2.10__tar.gz → 0.2.12__tar.gz
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.
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/CheeseAPI/handle.py +2 -2
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/CheeseAPI/request.py +5 -5
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/CheeseAPI.egg-info/PKG-INFO +1 -1
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/PKG-INFO +1 -1
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/setup.py +1 -1
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/CheeseAPI/__init__.py +0 -0
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/CheeseAPI/app.py +0 -0
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/CheeseAPI/cors.py +0 -0
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/CheeseAPI/exception.py +0 -0
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/CheeseAPI/file.py +0 -0
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/CheeseAPI/module.py +0 -0
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/CheeseAPI/protocol.py +0 -0
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/CheeseAPI/response.py +0 -0
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/CheeseAPI/route.py +0 -0
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/CheeseAPI/server.py +0 -0
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/CheeseAPI/signal.py +0 -0
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/CheeseAPI/websocket.py +0 -0
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/CheeseAPI/worker.py +0 -0
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/CheeseAPI/workspace.py +0 -0
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/CheeseAPI.egg-info/SOURCES.txt +0 -0
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/CheeseAPI.egg-info/dependency_links.txt +0 -0
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/CheeseAPI.egg-info/requires.txt +0 -0
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/CheeseAPI.egg-info/top_level.txt +0 -0
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/LICENSE +0 -0
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/README.md +0 -0
- {CheeseAPI-0.2.10 → CheeseAPI-0.2.12}/setup.cfg +0 -0
|
@@ -40,7 +40,7 @@ class Handle:
|
|
|
40
40
|
if await self._http_responseHandle(protocol, app, await self._http_404Handle(protocol, app)):
|
|
41
41
|
return
|
|
42
42
|
|
|
43
|
-
if protocol.request.method not in funcs
|
|
43
|
+
if protocol.request.method not in funcs:
|
|
44
44
|
if protocol.request.method == http.HTTPMethod.OPTIONS and (app.cors.origin == '*' or protocol.request.method in app.cors.origin):
|
|
45
45
|
if await self._http_responseHandle(protocol, app, await self._http_optionsHandle(protocol, app)):
|
|
46
46
|
return
|
|
@@ -240,7 +240,7 @@ A usable BaseResponse is not returned''')
|
|
|
240
240
|
logger.http(f'The {protocol.request.headers.get("X-Forwarded-For").split(", ")[0]} accessed {protocol.request.method} {protocol.request.fullPath} and returned {response.status}', f'The <cyan>{protocol.request.headers.get("X-Forwarded-For").split(", ")[0]}</cyan> accessed <cyan>{protocol.request.method} ' + logger.encode(protocol.request.fullPath) + f'</cyan> and returned <blue>{response.status}</blue>')
|
|
241
241
|
|
|
242
242
|
if protocol.transport.is_closing():
|
|
243
|
-
return
|
|
243
|
+
return True
|
|
244
244
|
|
|
245
245
|
if protocol.timeoutTask:
|
|
246
246
|
protocol.timeoutTask.cancel()
|
|
@@ -38,13 +38,13 @@ class Request:
|
|
|
38
38
|
if 'Content-Type' in self.headers:
|
|
39
39
|
_value = self.headers.get('Content-Type')
|
|
40
40
|
try:
|
|
41
|
-
if
|
|
41
|
+
if 'application/json' in _value or 'application/javascript' in _value:
|
|
42
42
|
self._body = json.loads(value)
|
|
43
|
-
elif
|
|
43
|
+
elif 'application/xml' in _value:
|
|
44
44
|
self._body = xmltodict.parse(value)
|
|
45
|
-
elif
|
|
45
|
+
elif 'text/plain' in _value or 'text/html' in _value:
|
|
46
46
|
self._body = value.decode()
|
|
47
|
-
elif
|
|
47
|
+
elif 'multipart/form-data' in _value:
|
|
48
48
|
spliter = _value.split('boundary=')[1].split(';')[0]
|
|
49
49
|
body = value.split(b'--' + spliter.encode())[1:-1]
|
|
50
50
|
for s in body:
|
|
@@ -55,7 +55,7 @@ class Request:
|
|
|
55
55
|
self.form[key] = File(filename[0].decode(), value)
|
|
56
56
|
else:
|
|
57
57
|
self.form[key] = value.decode()
|
|
58
|
-
elif
|
|
58
|
+
elif 'application/x-www-form-urlencoded' in _value:
|
|
59
59
|
for s in value.decode().split('&'):
|
|
60
60
|
s = s.split('=')
|
|
61
61
|
self.form[unquote(s[0])] = unquote(s[1].replace(r'+', r'%20'))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|