diff --git a/src/socketify/asgi.py b/src/socketify/asgi.py index c320f40..3116669 100644 --- a/src/socketify/asgi.py +++ b/src/socketify/asgi.py @@ -116,7 +116,7 @@ def write_header(ssl, res, key, value): @ffi.callback("void(uws_res_t*, void*)") def uws_asgi_corked_response_start_handler(res, user_data): (ssl, status, headers) = ffi.from_handle(user_data) - lib.socketify_res_write_int_status(ssl, res, status) + lib.socketify_res_write_int_status(ssl, res, int(status)) for name, value in headers: write_header(ssl, res, name, value) write_header(ssl, res, b'Server', b'socketify.py') diff --git a/src/socketify/native.py b/src/socketify/native.py index f5921bb..b22c998 100644 --- a/src/socketify/native.py +++ b/src/socketify/native.py @@ -359,7 +359,7 @@ void socketify_destroy_headers(socketify_header* headers); bool socketify_res_write_int_status_with_headers(int ssl, uws_res_t* res, int code, socketify_header* headers); void socketify_res_write_headers(int ssl, uws_res_t* res, socketify_header* headers); socketify_asgi_ws_data socketify_asgi_ws_request(int ssl, uws_req_t *req, uws_res_t *res); - +bool socketify_res_write_int_status(int ssl, uws_res_t* res, int code); socksocketify_asgi_app_info* socketify_add_asgi_http_handler(int ssl, uws_app_t* app, socketify_asgi_method_handler handler, void* user_data); void socketify_destroy_asgi_app_info(socksocketify_asgi_app_info* app);