kopia lustrzana https://github.com/cirospaciari/socketify.py
add Server headers to WSGI and ASGI
rodzic
f6b6a6e6ab
commit
0bbb7035a8
|
@ -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*)")
|
||||
|
|
|
@ -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()
|
||||
|
|
Ładowanie…
Reference in New Issue