add Server headers to WSGI and ASGI

pull/39/head
Ciro 2022-12-04 11:23:52 -03:00
rodzic f6b6a6e6ab
commit 0bbb7035a8
2 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -119,6 +119,7 @@ def uws_asgi_corked_response_start_handler(res, user_data):
lib.socketify_res_write_int_status(ssl, res, status)
for name, value in headers:
write_header(ssl, res, name, value)
write_header(ssl, res, b'Server', b'socketify.py')
@ffi.callback("void(int, uws_res_t*, socketify_asgi_data request, void*, bool*)")

Wyświetl plik

@ -95,6 +95,7 @@ def wsgi(ssl, response, info, user_data, aborted):
write_status(ssl, response, status)
for (name, value) in headers:
write_header(ssl, response, name, value)
write_header(ssl, response, b'Server', b'socketify.py')
# #check for body
if environ.get("HTTP_CONTENT_LENGTH", False) or environ.get("HTTP_TRANSFER_ENCODING", False):
WSGI_INPUT = BytesIO()