Lines Matching refs:req

20     nxt_unit_request_info_t  *req;  member
89 nxt_py_asgi_http_create(nxt_unit_request_info_t *req) in nxt_py_asgi_http_create() argument
96 http->req = req; in nxt_py_asgi_http_create()
118 nxt_unit_request_info_t *req; in nxt_py_asgi_http_receive() local
121 req = http->req; in nxt_py_asgi_http_receive()
123 nxt_unit_req_debug(req, "asgi_http_receive"); in nxt_py_asgi_http_receive()
126 msg = nxt_py_asgi_new_msg(req, nxt_py_http_disconnect_str); in nxt_py_asgi_http_receive()
136 ctx_data = req->ctx->data; in nxt_py_asgi_http_receive()
140 nxt_unit_req_alert(req, "Python failed to create Future object"); in nxt_py_asgi_http_receive()
150 return nxt_py_asgi_set_result_soon(req, ctx_data, future, msg); in nxt_py_asgi_http_receive()
169 nxt_unit_request_info_t *req; in nxt_py_asgi_http_read_msg() local
171 req = http->req; in nxt_py_asgi_http_read_msg()
173 size = req->content_length; in nxt_py_asgi_http_read_msg()
190 nxt_unit_req_alert(req, "Python failed to create body byte string"); in nxt_py_asgi_http_read_msg()
199 read_res = nxt_unit_request_read(req, body_buf, size); in nxt_py_asgi_http_read_msg()
207 msg = nxt_py_asgi_new_msg(req, nxt_py_http_request_str); in nxt_py_asgi_http_read_msg()
218 nxt_unit_req_alert(req, \ in nxt_py_asgi_http_read_msg()
229 if (req->content_length > 0) { in nxt_py_asgi_http_read_msg()
268 nxt_unit_req_error(http->req, "asgi_http_send: " in nxt_py_asgi_http_send()
275 nxt_unit_req_debug(http->req, "asgi_http_send type is '%.*s'", in nxt_py_asgi_http_send()
278 if (nxt_unit_response_is_init(http->req)) { in nxt_py_asgi_http_send()
308 nxt_unit_req_error(http->req, "asgi_http_response_start: " in nxt_py_asgi_http_response_start()
327 rc = nxt_unit_response_init(http->req, PyLong_AsLong(status), in nxt_py_asgi_http_response_start()
335 add_field_ctx.req = http->req; in nxt_py_asgi_http_response_start()
396 nxt_unit_req_debug(http->req, "asgi_http_response_body: %d, %d", in nxt_py_asgi_http_response_body()
408 ctx_data = http->req->ctx->data; in nxt_py_asgi_http_response_body()
411 sent = nxt_unit_response_write_nb(http->req, body_str, body_len, 0); in nxt_py_asgi_http_response_body()
417 nxt_unit_req_debug(http->req, "asgi_http_response_body: " in nxt_py_asgi_http_response_body()
424 nxt_unit_req_alert(http->req, in nxt_py_asgi_http_response_body()
436 nxt_py_asgi_drain_wait(http->req, &http->link); in nxt_py_asgi_http_response_body()
451 nxt_unit_req_debug(http->req, "asgi_http_response_body: 0, %d", in nxt_py_asgi_http_response_body()
454 if (!nxt_unit_response_is_sent(http->req)) { in nxt_py_asgi_http_response_body()
455 rc = nxt_unit_response_send(http->req); in nxt_py_asgi_http_response_body()
483 msg = nxt_py_asgi_new_msg(http->req, nxt_py_http_disconnect_str); in nxt_py_asgi_http_emit_disconnect()
510 nxt_unit_req_alert(http->req, "'done' call failed"); in nxt_py_asgi_http_set_result()
518 nxt_unit_req_alert(http->req, "'set_result' call failed"); in nxt_py_asgi_http_set_result()
532 nxt_py_asgi_http_data_handler(nxt_unit_request_info_t *req) in nxt_py_asgi_http_data_handler() argument
537 http = req->data; in nxt_py_asgi_http_data_handler()
539 nxt_unit_req_debug(req, "asgi_http_data_handler"); in nxt_py_asgi_http_data_handler()
578 nxt_unit_req_debug(http->req, "asgi_http_drain: %d", (int) body_len); in nxt_py_asgi_http_drain()
581 sent = nxt_unit_response_write_nb(http->req, body_str, body_len, 0); in nxt_py_asgi_http_drain()
612 nxt_unit_req_alert(http->req, "RuntimeError create failed"); in nxt_py_asgi_http_drain()
625 nxt_unit_req_alert(http->req, "'set_exception' call failed"); in nxt_py_asgi_http_drain()
638 nxt_py_asgi_http_close_handler(nxt_unit_request_info_t *req) in nxt_py_asgi_http_close_handler() argument
642 http = req->data; in nxt_py_asgi_http_close_handler()
644 nxt_unit_req_debug(req, "asgi_http_close_handler"); in nxt_py_asgi_http_close_handler()
663 nxt_unit_req_debug(http->req, "asgi_http_done"); in nxt_py_asgi_http_done()
671 nxt_unit_req_error(http->req, in nxt_py_asgi_http_done()
683 nxt_unit_request_done(http->req, rc); in nxt_py_asgi_http_done()