Home
last modified time | relevance | path

Searched refs:r (Results 1 – 25 of 98) sorted by relevance

1234

/unit/src/
H A Dnxt_random.c41 r->i = 0; in nxt_random_start_schedule()
42 r->j = 0; in nxt_random_start_schedule()
124 val = r->s[r->i]; in nxt_random_add()
127 r->s[r->i] = r->s[r->j]; in nxt_random_add()
128 r->s[r->j] = val; in nxt_random_add()
134 r->i--; in nxt_random_add()
136 r->j = r->i; in nxt_random_add()
166 si = r->s[r->i]; in nxt_random_byte()
169 sj = r->s[r->j]; in nxt_random_byte()
170 r->s[r->i] = sj; in nxt_random_byte()
[all …]
H A Dnxt_http_error.c35 if (r->header_sent || r->error) { in nxt_http_request_error()
41 r->status = status; in nxt_http_request_error()
43 r->resp.fields = nxt_list_create(r->mem_pool, 8, sizeof(nxt_http_field_t)); in nxt_http_request_error()
55 r->resp.content_length = NULL; in nxt_http_request_error()
60 nxt_http_request_header_send(task, r, in nxt_http_request_error()
66 nxt_http_request_error_handler(task, r, r->proto.any); in nxt_http_request_error()
81 nxt_http_request_t *r; in nxt_http_request_send_error_body() local
83 r = obj; in nxt_http_request_send_error_body()
93 r->status, r->status); in nxt_http_request_send_error_body()
95 out->next = nxt_http_buf_last(r); in nxt_http_request_send_error_body()
[all …]
H A Dnxt_http_request.c83 r = ctx; in nxt_http_request_host()
200 r = ctx; in nxt_http_request_field()
215 r = ctx; in nxt_http_request_content_length()
277 return r; in nxt_http_request_create()
301 r = obj; in nxt_http_request_start()
468 r = obj; in nxt_http_request_ready()
512 r->server_name = r->host; in nxt_http_application_handler()
705 r = obj; in nxt_http_request_error_handler()
713 nxt_http_proto[r->protocol].discard(task, r, nxt_http_buf_last(r)); in nxt_http_request_error_handler()
727 r = obj; in nxt_http_request_close_handler()
[all …]
H A Dnxt_http_proxy.c137 r->peer = peer; in nxt_upstream_proxy_handler()
208 r = obj; in nxt_http_proxy_header_send()
230 r = obj; in nxt_http_proxy_header_sent()
253 r = obj; in nxt_http_proxy_header_read()
299 r = obj; in nxt_http_proxy_send_body()
347 r = data; in nxt_http_proxy_buf_mem_completion()
349 peer = r->peer; in nxt_http_proxy_buf_mem_completion()
381 r = obj; in nxt_http_proxy_error()
388 nxt_http_request_error(&r->task, r, peer->status); in nxt_http_proxy_error()
397 r = ctx; in nxt_http_proxy_date()
[all …]
H A Dnxt_h1proto_websocket.c83 h1p = r->proto.h1; in nxt_h1p_websocket_first_frame_start()
176 r = h1p->request; in nxt_h1p_conn_ws_keepalive()
183 nxt_http_request_error_handler(task, r, r->proto.any); in nxt_h1p_conn_ws_keepalive()
437 r->state->ready_handler(task, r, NULL); in nxt_h1p_conn_ws_frame_process()
456 r->state->error_handler(task, r, h1p); in nxt_h1p_conn_ws_error()
605 nxt_http_request_error_handler(task, r, r->proto.any); in hxt_h1p_send_ws_error()
637 r = data; in nxt_h1p_conn_ws_error_sent()
641 r->state->error_handler(task, r, r->proto.any); in nxt_h1p_conn_ws_error_sent()
656 r = obj; in nxt_h1p_conn_ws_pong()
670 nxt_http_request_error_handler(task, r, r->proto.any); in nxt_h1p_conn_ws_pong()
[all …]
H A Dnxt_http_return.c24 nxt_http_request_t *r, nxt_http_action_t *action);
111 r->status = conf->status; in nxt_http_return()
112 r->resp.content_length_n = 0; in nxt_http_return()
119 nxt_http_return_send_ready(task, r, ctx); in nxt_http_return()
122 ret = nxt_var_query_init(&r->var_query, r, r->mem_pool); in nxt_http_return()
174 nxt_http_request_t *r; in nxt_http_return_send_ready() local
177 r = obj; in nxt_http_return_send_ready()
189 field = nxt_list_zero_add(r->resp.fields); in nxt_http_return_send_ready()
200 r->state = &nxt_http_return_send_state; in nxt_http_return_send_ready()
215 nxt_http_request_t *r; in nxt_http_return_var_error() local
[all …]
H A Dnxt_http_static.c256 ret = nxt_var_query_init(&r->var_query, r, r->mem_pool); in nxt_http_static_iterate()
300 r = obj; in nxt_http_static_send_ready()
596 encode = nxt_encode_uri(NULL, r->path->start, r->path->length); in nxt_http_static_send_ready()
615 p = nxt_cpymem(p, r->path->start, r->path->length); in nxt_http_static_send_ready()
622 nxt_memcpy(p, r->args->start, r->args->length); in nxt_http_static_send_ready()
648 r = obj; in nxt_http_static_var_error()
774 r = obj; in nxt_http_static_body_handler()
775 fb = r->out; in nxt_http_static_body_handler()
835 r = data; in nxt_http_static_buf_completion()
839 fb = r->out; in nxt_http_static_buf_completion()
[all …]
H A Dnxt_h1proto.c988 r->state->ready_handler(task, r, NULL); in nxt_h1p_request_body_read()
1679 r->state->error_handler(task, r, h1p); in nxt_h1p_request_error()
2200 r->state->error_handler(task, r, peer); in nxt_h1p_peer_connect()
2228 r->state->ready_handler(task, r, peer); in nxt_h1p_peer_connected()
2246 r->state->error_handler(task, r, peer); in nxt_h1p_peer_refused()
2396 r->state->ready_handler(task, r, peer); in nxt_h1p_peer_header_sent()
2576 r->state->error_handler(task, r, peer); in nxt_h1p_peer_header_read_done()
2707 r->state->ready_handler(task, r, peer); in nxt_h1p_peer_body_process()
2751 r->state->error_handler(task, r, peer); in nxt_h1p_peer_error()
2775 r->state->error_handler(task, r, peer); in nxt_h1p_peer_send_timeout()
[all …]
H A Dnxt_http_variables.c44 nxt_http_request_t *r; in nxt_http_var_method() local
46 r = ctx; in nxt_http_var_method()
48 *str = *r->method; in nxt_http_var_method()
58 nxt_http_request_t *r; in nxt_http_var_uri() local
60 r = ctx; in nxt_http_var_uri()
62 *str = *r->path; in nxt_http_var_uri()
72 nxt_http_request_t *r; in nxt_http_var_host() local
74 r = ctx; in nxt_http_var_host()
76 *str = r->host; in nxt_http_var_host()
H A Dnxt_job_resolve.c19 struct addrinfo hint, *res, *r; in nxt_job_resolve() local
55 for (r = res; r != NULL; r = r->ai_next) { in nxt_job_resolve()
57 switch (r->ai_addr->sa_family) { in nxt_job_resolve()
79 for (r = res; r != NULL; r = r->ai_next) { in nxt_job_resolve()
81 switch (r->ai_addr->sa_family) { in nxt_job_resolve()
95 sa = nxt_sockaddr_create(mp, r->ai_addr, r->ai_addrlen, length); in nxt_job_resolve()
H A Dnxt_http_websocket.c35 nxt_http_request_t *r; in nxt_http_websocket_client() local
39 r = obj; in nxt_http_websocket_client()
40 req_rpc_data = r->req_rpc_data; in nxt_http_websocket_client()
50 wsh = (nxt_websocket_header_t *) r->ws_frame->mem.pos; in nxt_http_websocket_client()
60 b = r->ws_frame; in nxt_http_websocket_client()
95 r->ws_frame = next; in nxt_http_websocket_client()
109 b = r->ws_frame; in nxt_http_websocket_client()
122 nxt_http_request_ws_frame_start(task, r, r->ws_frame); in nxt_http_websocket_client()
129 nxt_http_request_t *r; in nxt_http_websocket_error_handler() local
134 r = obj; in nxt_http_websocket_error_handler()
[all …]
H A Dnxt_http.h231 nxt_http_request_t *r,
247 void (*body_read)(nxt_task_t *task, nxt_http_request_t *r);
248 void (*local_addr)(nxt_task_t *task, nxt_http_request_t *r);
312 nxt_buf_t *nxt_http_buf_last(nxt_http_request_t *r);
323 nxt_array_t *nxt_http_arguments_parse(nxt_http_request_t *r);
324 nxt_array_t *nxt_http_cookies_parse(nxt_http_request_t *r);
338 nxt_int_t nxt_http_route_addr_rule(nxt_http_request_t *r,
342 nxt_int_t nxt_http_route_test_rule(nxt_http_request_t *r,
366 nxt_http_request_t *r, nxt_http_action_t *action);
370 nxt_http_request_t *r, nxt_upstream_t *upstream);
[all …]
H A Dnxt_http_response.c49 nxt_http_request_t *r; in nxt_http_response_status() local
51 r = ctx; in nxt_http_response_status()
59 r->status = status; in nxt_http_response_status()
80 nxt_http_request_t *r; in nxt_http_response_field() local
82 r = ctx; in nxt_http_response_field()
84 nxt_value_at(nxt_http_field_t *, r, offset) = field; in nxt_http_response_field()
H A Dnxt_php_sapi.c1057 f = r->fields + r->content_type_field;
1063 f = r->fields + r->cookie_field;
1069 f = r->fields + r->authorization_field;
1321 nxt_php_set_sptr(req, "PHP_SELF", &r->path, r->path_length,
1361 nxt_php_set_sptr(req, "REQUEST_URI", &r->target, r->target_length,
1363 nxt_php_set_sptr(req, "QUERY_STRING", &r->query, r->query_length,
1368 nxt_php_set_sptr(req, "SERVER_ADDR", &r->local, r->local_length,
1375 if (r->tls) {
1379 f_end = r->fields + r->fields_count;
1388 f = r->fields + r->content_length_field;
[all …]
/unit/go/
H A Dresponse.go25 return r.header
29 if !r.header_sent {
30 r.WriteHeader(http.StatusOK)
44 if r.ch == nil {
45 r.ch = make(chan int, 2)
48 wait_shm_ack(r.ch)
56 if r.header_sent {
60 r.header_sent = true
70 for k, vv := range r.header {
90 func (r *response) Flush() {
[all …]
H A Drequest.go37 func (r *request) Close() error {
53 r = &request{
70 r.req.Body = r
73 r.req.TLS = &tls.ConnectionState{ }
74 r.req.URL.Scheme = "https"
77 r.req.URL.Scheme = "http"
88 r.req.Header.Add(n, v)
91 return r, nil
114 r, err := new_request(c_req)
117 handler.ServeHTTP(&r.resp, &r.req)
[all …]
/unit/src/java/
H A Dnxt_jni_Request.c278 nxt_unit_request_t *r; in nxt_java_Request_getHeader() local
287 f = nxt_java_findHeader(r->fields, r->fields + r->fields_count, in nxt_java_Request_getHeader()
307 return nxt_java_newHeaderNamesEnumeration(env, r->fields, r->fields_count); in nxt_java_Request_getHeaderNames()
326 f = nxt_java_findHeader(r->fields, r->fields + r->fields_count, in nxt_java_Request_getHeaders()
332 f = r->fields + r->fields_count; in nxt_java_Request_getHeaders()
335 return nxt_java_newHeadersEnumeration(env, r->fields, r->fields_count, in nxt_java_Request_getHeaders()
359 f = nxt_java_findHeader(r->fields, r->fields + r->fields_count, in nxt_java_Request_getIntHeader()
448 f = r->fields + r->content_type_field; in nxt_java_Request_getContentType()
606 f = nxt_java_findHeader(r->fields, r->fields + r->fields_count, in nxt_java_Request_getServerName()
634 f = nxt_java_findHeader(r->fields, r->fields + r->fields_count, in nxt_java_Request_getServerPort()
[all …]
/unit/test/go/variables/
H A Dapp.go10 func handler(w http.ResponseWriter, r *http.Request) {
12 len, _ := r.Body.Read(buf[:])
14 w.Header().Set("Request-Method", r.Method)
15 w.Header().Set("Request-Uri", r.RequestURI)
16 w.Header().Set("Server-Protocol", r.Proto)
17 w.Header().Set("Server-Protocol-Major", fmt.Sprintf("%v", r.ProtoMajor))
18 w.Header().Set("Server-Protocol-Minor", fmt.Sprintf("%v", r.ProtoMinor))
20 w.Header().Set("Content-Type", r.Header.Get("Content-Type"))
21 w.Header().Set("Custom-Header", r.Header.Get("Custom-Header"))
22 w.Header().Set("Http-Host", r.Header.Get("Host"))
/unit/test/
H A Dtest_access_log.py38 self.wait_for_record(r'"POST / HTTP/1.1" 200 5') is not None
52 self.wait_for_record(r'"POST / HTTP/1.1" 200 10') is not None
78 self.wait_for_record(r'"GET / HTTP/1.1" 200 0 "Referer-1" "-"')
101 r'::1 - - \[.+\] "GET / HTTP/1.1" 200 0 "-" "-"'
119 r'unix: - - \[.+\] "GET / HTTP/1.1" 200 0 "-" "-"'
153 r'"GET / HTTP/1.1" 200 0 "-" "user-agent-value"'
177 self.wait_for_record(r'"GE" 400 0 "-" "-"') is not None
188 self.wait_for_record(r'"GET /" 400 \d+ "-" "-"') is not None
201 self.wait_for_record(r'"GET /" 400 0 "-" "-"') is not None
226 self.wait_for_record(r'"GET / HTTP/1.1" 400 \d+ "-" "-"')
[all …]
H A Dtest_php_application.py38 r = self.check_opcache()
424 r'exec: \/\w+', body
501 r'exec: \/\w+', body
518 r'exec: \/\w+', body
534 r'time: \d+', body
537 r'exec: \/\w+', body
544 r'012345', self.get()['body']
553 r'012345', self.get()['body']
751 r = self.check_opcache()
752 pid = r['headers']['X-Pid']
[all …]
H A Dtest_respawn.py26 m = re.search(r'\s*(\d+)\s*' + str(ppid) + r'.*' + name, output)
44 return re.findall(str(ppid) + r'.*' + name, ps_output)
48 r = self.conf('1', 'applications/' + self.app_name + '/processes')
50 if 'success' in r:
55 assert 'success' in r
71 skip_alert(r'process %s exited on signal 9' % pid)
82 skip_alert(r'process %s exited on signal 9' % pid)
96 skip_alert(r'process %s exited on signal 9' % pid)
/unit/src/test/
H A Dnxt_unit_app_test.c152 nxt_unit_request_t *r; in greeting_app_request_handler() local
181 r = req->request; in greeting_app_request_handler()
216 p = copy(p, nxt_unit_sptr_get(&r->method), r->method_length); in greeting_app_request_handler()
220 p = copy(p, nxt_unit_sptr_get(&r->version), r->version_length); in greeting_app_request_handler()
224 p = copy(p, nxt_unit_sptr_get(&r->remote), r->remote_length); in greeting_app_request_handler()
228 p = copy(p, nxt_unit_sptr_get(&r->local), r->local_length); in greeting_app_request_handler()
232 p = copy(p, nxt_unit_sptr_get(&r->target), r->target_length); in greeting_app_request_handler()
236 p = copy(p, nxt_unit_sptr_get(&r->path), r->path_length); in greeting_app_request_handler()
239 if (r->query.offset) { in greeting_app_request_handler()
241 p = copy(p, nxt_unit_sptr_get(&r->query), r->query_length); in greeting_app_request_handler()
[all …]
/unit/test/go/post_variables/
H A Dapp.go8 func handler(w http.ResponseWriter, r *http.Request) {
9 r.ParseForm()
11 w.Header().Set("X-Var-1", r.Form.Get("var1"))
12 w.Header().Set("X-Var-2", r.Form.Get("var2"))
13 w.Header().Set("X-Var-3", r.Form.Get("var3"))
/unit/test/go/get_variables/
H A Dapp.go8 func handler(w http.ResponseWriter, r *http.Request) {
9 w.Header().Set("X-Var-1", r.URL.Query().Get("var1"))
10 w.Header().Set("X-Var-2", r.URL.Query().Get("var2"))
11 w.Header().Set("X-Var-3", r.URL.Query().Get("var3"))
/unit/src/java/nginx/unit/websocket/
H A DAsyncChannelGroupUtil.java117 public Thread newThread(final Runnable r) { in newThread() argument
122 return AccessController.doPrivileged(new NewThreadPrivilegedAction(r)); in newThread()
131 private final Runnable r; field in AsyncChannelGroupUtil.AsyncIOThreadFactory.NewThreadPrivilegedAction
133 public NewThreadPrivilegedAction(Runnable r) { in NewThreadPrivilegedAction() argument
134 this.r = r; in NewThreadPrivilegedAction()
139 Thread t = new Thread(r); in run()

1234