Home
last modified time | relevance | path

Searched refs:req (Results 1 – 25 of 75) sorted by relevance

123

/unit/src/java/
H A Dnxt_jni_Response.c273 if (req == NULL) { in nxt_java_Response_addHeader()
319 data = req->data; in nxt_java_get_response_info()
346 rc = nxt_unit_response_realloc(req, 2 * req->response_max_fields, in nxt_java_get_response_info()
355 return req; in nxt_java_get_response_info()
370 if (req == NULL) { in nxt_java_Response_addIntHeader()
599 data = req->data; in nxt_java_Response_getRequest()
640 if (req == NULL) { in nxt_java_Response_sendRedirect()
927 data = req->data; in nxt_java_Response_reset()
952 data = req->data; in nxt_java_Response_resetBuffer()
968 data = req->data; in nxt_java_Response_setBufferSize()
[all …]
H A Dnxt_jni_InputStream.c95 nxt_unit_request_info_t *req; in nxt_java_InputStream_readLine() local
118 nxt_unit_request_info_t *req; in nxt_java_InputStream_isFinished() local
122 return req->content_length == 0; in nxt_java_InputStream_isFinished()
131 nxt_unit_request_info_t *req; in nxt_java_InputStream_readByte() local
147 nxt_unit_request_info_t *req; in nxt_java_InputStream_read() local
168 nxt_unit_request_info_t *req; in nxt_java_InputStream_skip() local
174 buf = req->content_buf; in nxt_java_InputStream_skip()
194 n = n < (jlong) req->content_length ? n : (jlong) req->content_length; in nxt_java_InputStream_skip()
196 req->content_length -= n; in nxt_java_InputStream_skip()
205 nxt_unit_request_info_t *req; in nxt_java_InputStream_available() local
[all …]
H A Dnxt_jni_OutputStream.c19 nxt_unit_request_info_t *req);
85 nxt_unit_request_info_t *req; in nxt_java_OutputStream_writeByte() local
88 req = nxt_jlong2ptr(req_info_ptr); in nxt_java_OutputStream_writeByte()
89 data = req->data; in nxt_java_OutputStream_writeByte()
110 data = req->data; in nxt_java_OutputStream_flush_buf()
154 data = req->data; in nxt_java_OutputStream_req_buf()
182 nxt_unit_request_info_t *req; in nxt_java_OutputStream_write() local
185 req = nxt_jlong2ptr(req_info_ptr); in nxt_java_OutputStream_write()
186 data = req->data; in nxt_java_OutputStream_write()
220 nxt_unit_request_info_t *req; in nxt_java_OutputStream_flush() local
[all …]
H A Dnxt_jni_Request.c268 nxt_ptr2jlong(req->request)); in nxt_java_newRequest()
674 nxt_unit_request_info_t *req; in nxt_java_Request_upgrade() local
689 nxt_unit_request_info_t *req; in nxt_java_Request_isUpgrade() local
702 nxt_unit_request_info_t *req; in nxt_java_Request_log() local
723 nxt_unit_request_info_t *req; in nxt_java_Request_trace() local
742 nxt_unit_request_info_t *req; in nxt_java_Request_getResponse() local
746 data = req->data; in nxt_java_Request_getResponse()
756 nxt_unit_request_info_t *req; in nxt_java_Request_sendWsFrameBuf() local
774 nxt_unit_request_info_t *req; in nxt_java_Request_sendWsFrameArr() local
797 nxt_unit_request_info_t *req; in nxt_java_Request_closeWs() local
[all …]
/unit/go/
H A Drequest.go22 req http.Request member
42 req := c_req.request
44 uri := GoStringN(&req.target, C.int(req.target_length))
51 proto := GoStringN(&req.version, C.int(req.version_length))
54 req: http.Request {
58 Method: GoStringN(&req.method, C.int(req.method_length)),
63 Host: GoStringN(&req.server_name, C.int(req.server_name_length)),
64 RemoteAddr: GoStringN(&req.remote, C.int(req.remote_length)),
70 r.req.Body = r
72 if req.tls != 0 {
[all …]
/unit/src/test/
H A Dnxt_unit_websocket_chat.c55 r = req->request; in ws_chat_request_handler()
60 rc = ws_chat_root(req); in ws_chat_request_handler()
74 data = req->data; in ws_chat_request_handler()
79 nxt_unit_response_upgrade(req); in ws_chat_request_handler()
80 nxt_unit_response_send(req); in ws_chat_request_handler()
96 nxt_unit_request_done(req, rc); in ws_chat_request_handler()
116 rc = nxt_unit_response_add_field(req, in ws_chat_root()
137 return nxt_unit_response_send(req); in ws_chat_root()
145 nxt_unit_request_info_t *req; in ws_chat_broadcast() local
171 data = ws->req->data; in ws_chat_websocket_handler()
[all …]
H A Dnxt_unit_websocket_echo.c17 ws_echo_request_handler(nxt_unit_request_info_t *req) in ws_echo_request_handler() argument
23 target = nxt_unit_sptr_get(&req->request->target); in ws_echo_request_handler()
26 if (!nxt_unit_request_is_websocket_handshake(req)) { in ws_echo_request_handler()
30 rc = nxt_unit_response_init(req, 101, 0, 0); in ws_echo_request_handler()
35 nxt_unit_response_upgrade(req); in ws_echo_request_handler()
36 nxt_unit_response_send(req); in ws_echo_request_handler()
43 rc = nxt_unit_response_init(req, 404, 0, 0); in ws_echo_request_handler()
47 nxt_unit_request_done(req, rc); in ws_echo_request_handler()
56 nxt_unit_request_info_t *req; in ws_echo_websocket_handler() local
66 req = ws->req; in ws_echo_websocket_handler()
[all …]
/unit/test/node/variables/
H A Dapp.js2 require('http').createServer(function (req, res) { argument
4 req.on('data', chunk => {
7 req.on('end', () => {
8 res.setHeader('Request-Method', req.method);
9 res.setHeader('Request-Uri', req.url);
10 res.setHeader('Server-Protocol', req.httpVersion);
11 res.setHeader('Request-Raw-Headers', req.rawHeaders.join());
13 res.setHeader('Content-Type', req.headers['content-type']);
14 res.setHeader('Custom-Header', req.headers['custom-header']);
15 res.setHeader('Http-Host', req.headers['host']);
/unit/src/
H A Dnxt_unit.h127 void (*data_handler)(nxt_unit_request_info_t *req);
133 void (*close_handler)(nxt_unit_request_info_t *req);
260 int nxt_unit_response_init(nxt_unit_request_info_t *req,
279 int nxt_unit_response_send(nxt_unit_request_info_t *req);
369 #define nxt_unit_req_debug(req, fmt, ARGS...) \ argument
376 #define nxt_unit_req_debug(req, fmt, ARGS...) argument
384 #define nxt_unit_req_warn(req, fmt, ARGS...) \ argument
385 nxt_unit_req_log(req, NXT_UNIT_LOG_WARN, fmt, ##ARGS)
390 #define nxt_unit_req_error(req, fmt, ARGS...) \ argument
391 nxt_unit_req_log(req, NXT_UNIT_LOG_ERR, fmt, ##ARGS)
[all …]
H A Dnxt_unit.c1300 req = &req_impl->req; in nxt_unit_process_req_headers()
1322 b->req = req; in nxt_unit_process_req_headers()
1411 b->req = req; in nxt_unit_process_req_body()
1632 ws_impl->ws.req = req; in nxt_unit_process_websocket()
1638 b->req = req; in nxt_unit_process_websocket()
1659 b->req = req; in nxt_unit_process_websocket()
2408 mmap_buf->req = req; in nxt_unit_response_buf_alloc()
2555 req = mmap_buf->req; in nxt_unit_buf_send()
2595 req = mmap_buf->req; in nxt_unit_buf_send_done()
4795 req = &req_impl->req; in nxt_unit_process_ready_req()
[all …]
H A Dnxt_php_sapi.c62 nxt_unit_request_info_t *req; member
259 ctx->req = NULL; in PHP_FUNCTION()
930 r = req->request; in nxt_php_request_handler()
935 ctx.req = req; in nxt_php_request_handler()
1130 if (ctx->req != NULL) {
1190 nxt_unit_request_info_t *req; local
1193 req = ctx->req;
1244 rc = nxt_unit_response_send(req);
1293 nxt_unit_request_info_t *req; local
1297 req = ctx->req;
[all …]
H A Dnxt_controller.c1048 c = req->conn; in nxt_controller_process_request()
1049 path = req->parser.path; in nxt_controller_process_request()
1211 c = req->conn; in nxt_controller_process_config()
1345 req->conf.pool = mp; in nxt_controller_process_config()
1559 req = data; in nxt_controller_status_handler()
1646 c = req->conn; in nxt_controller_process_cert()
1805 req = data; in nxt_controller_process_cert_save()
1817 c = req->conn; in nxt_controller_process_cert_save()
1881 req = data; in nxt_controller_conf_handler()
2039 req = data; in nxt_controller_app_restart_handler()
[all …]
/unit/src/python/
H A Dnxt_python_asgi_http.c20 nxt_unit_request_info_t *req; member
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()
136 ctx_data = req->ctx->data; 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()
335 add_field_ctx.req = http->req; in nxt_py_asgi_http_response_start()
530 http = req->data; in nxt_py_asgi_http_data_handler()
[all …]
H A Dnxt_python_asgi_websocket.c37 nxt_unit_request_info_t *req; member
122 ws->req = req; in nxt_py_asgi_websocket_create()
157 nxt_unit_req_error(ws->req, in nxt_py_asgi_websocket_receive()
164 ctx_data = ws->req->ctx->data; in nxt_py_asgi_websocket_receive()
323 add_field_ctx.req = ws->req; in nxt_py_asgi_websocket_accept()
497 ws = frame->req->data; in nxt_py_asgi_websocket_handler()
509 nxt_unit_req_debug(ws->req, in nxt_py_asgi_websocket_handler()
682 ws = frame->req->data; in nxt_py_asgi_websocket_suspend_frame()
698 nxt_unit_req_alert(ws->req, in nxt_py_asgi_websocket_suspend_frame()
766 nxt_unit_req_alert(ws->req, in nxt_py_asgi_websocket_pop_msg()
[all …]
H A Dnxt_python_asgi.h13 void nxt_py_asgi_drain_wait(nxt_unit_request_info_t *req,
22 nxt_unit_request_info_t *req; member
45 PyObject *nxt_py_asgi_set_result_soon(nxt_unit_request_info_t *req,
47 PyObject *nxt_py_asgi_new_msg(nxt_unit_request_info_t *req, PyObject *type);
48 PyObject *nxt_py_asgi_new_scope(nxt_unit_request_info_t *req, PyObject *type,
57 PyObject *nxt_py_asgi_http_create(nxt_unit_request_info_t *req);
58 void nxt_py_asgi_http_data_handler(nxt_unit_request_info_t *req);
60 void nxt_py_asgi_http_close_handler(nxt_unit_request_info_t *req);
63 PyObject *nxt_py_asgi_websocket_create(nxt_unit_request_info_t *req);
65 void nxt_py_asgi_websocket_close_handler(nxt_unit_request_info_t *req);
H A Dnxt_python_asgi.c420 if (req->request->websocket_handshake) { in nxt_py_asgi_request_handler()
424 asgi = nxt_py_asgi_http_create(req); in nxt_py_asgi_request_handler()
465 req->data = asgi; in nxt_py_asgi_request_handler()
488 nxt_unit_req_error(req, in nxt_py_asgi_request_handler()
521 ctx_data = req->ctx->data; in nxt_py_asgi_request_handler()
539 nxt_unit_req_error(req, in nxt_py_asgi_request_handler()
599 r = req->request; in nxt_py_asgi_create_http_scope()
1245 nxt_unit_request_info_t *req; in nxt_py_asgi_add_field() local
1255 req = ctx->req; in nxt_py_asgi_add_field()
1421 nxt_unit_req_alert(req, in nxt_py_asgi_new_scope()
[all …]
H A Dnxt_python_wsgi.c49 nxt_unit_request_info_t *req; member
309 pctx = req->ctx->data; in nxt_python_request_handler()
313 pctx->req = req; in nxt_python_request_handler()
408 nxt_unit_req_error(req, in nxt_python_request_handler()
441 pctx->req = NULL; in nxt_python_request_handler()
443 nxt_unit_request_done(req, rc); in nxt_python_request_handler()
573 nxt_unit_req_alert(req, in nxt_python_copy_environ()
591 r = pctx->req->request; in nxt_python_get_environ()
672 nxt_unit_req_error(pctx->req, in nxt_python_get_environ()
702 nxt_unit_req_error(pctx->req, in nxt_python_add_sptr()
[all …]
/unit/src/nodejs/unit-http/
H A Dunit.cpp308 obj->request_handler(req); in request_handler_cb()
394 obj->close_handler(req); in close_handler_cb()
589 r = req->request; in create_headers()
650 r = req->request; in create_socket()
668 nxt_unit_request_info_t *req) in create_request() argument
686 nxt_unit_request_info_t *req) in create_response() argument
746 nxt_unit_request_info_t *req; in request_read() local
795 nxt_unit_request_info_t *req; in response_send_headers() local
866 f = req->response->fields + req->response->fields_count; in response_send_headers()
892 f = req->response->fields + req->response->fields_count; in response_send_headers()
[all …]
H A Dunit.h31 static void request_handler_cb(nxt_unit_request_info_t *req);
32 void request_handler(nxt_unit_request_info_t *req);
37 static void close_handler_cb(nxt_unit_request_info_t *req);
38 void close_handler(nxt_unit_request_info_t *req);
53 nxt_unit_request_info_t *req);
56 nxt_unit_request_info_t *req);
59 nxt_unit_request_info_t *req);
75 void create_headers(nxt_unit_request_info_t *req, napi_value request);
/unit/src/perl/
H A Dnxt_perl_psgi.c25 nxt_unit_request_info_t *req; member
232 if (pctx->req != NULL) { in nxt_perl_psgi_cb_request_done()
234 pctx->req = NULL; in nxt_perl_psgi_cb_request_done()
467 arg->req = req; in nxt_perl_psgi_io_init()
604 pctx = req->ctx->data; in nxt_perl_psgi_env_create()
619 r = req->request; in nxt_perl_psgi_env_create()
1102 pctx = req->ctx->data; in nxt_perl_psgi_result_cb()
1209 pctx = req->ctx->data; in nxt_perl_psgi_request_handler()
1212 pctx->req = req; in nxt_perl_psgi_request_handler()
1224 pctx->req = NULL; in nxt_perl_psgi_request_handler()
[all …]
/unit/src/ruby/
H A Dnxt_ruby.c292 ruby_ctx.req = NULL; in nxt_ruby_start()
638 req = data; in nxt_ruby_request_handler_gvl()
640 rctx = req->ctx->data; in nxt_ruby_request_handler_gvl()
641 rctx->req = req; in nxt_ruby_request_handler_gvl()
654 rctx->req = NULL; in nxt_ruby_request_handler_gvl()
671 rctx = req->ctx->data; in nxt_ruby_rack_app_run()
677 nxt_unit_req_alert(req, in nxt_ruby_rack_app_run()
685 nxt_unit_req_error(req, in nxt_ruby_rack_app_run()
737 r = req->request; in nxt_ruby_read_request()
851 headers_info.req = req; in nxt_ruby_rack_result_headers()
[all …]
/unit/test/
H A Dtest_settings.py16 def req(): function
102 def req(): function
170 def req(addr, data_len): function
174 req = (
184 sock.sendall(req.encode())
212 data = req(addr, data_len)
218 data = req(addr, data_len)
225 def req(): function
239 assert req()['status'] == 408, 'status idle timeout'
247 def req(): function
[all …]
H A Dtest_upstreams_rr.py46 def get_resps(self, req=100, port=7080): argument
49 for _ in range(req):
67 req - 1
96 resps = self.get_resps(req=50)
115 resps = self.get_resps_sc(req=30)
132 resps = self.get_resps_sc(req=10)
202 resps = self.get_resps_sc(req=20)
219 resps = self.get_resps_sc(req=30)
288 req = 50
291 for i in range(req):
[all …]
/unit/test/node/mirror/
H A Dapp.js2 require('http').createServer(function (req, res) { argument
4 req.on('data', chunk => {
7 req.on('end', () => {
/unit/src/java/nginx/unit/websocket/server/
H A DWsFilter.java58 HttpServletRequest req = (HttpServletRequest) request; in doFilter() local
63 String pathInfo = req.getPathInfo(); in doFilter()
65 path = req.getServletPath(); in doFilter()
67 path = req.getServletPath() + pathInfo; in doFilter()
78 UpgradeUtil.doUpgrade(sc, req, resp, mappingResult.getConfig(), in doFilter()

123