Home
last modified time | relevance | path

Searched refs:fields (Results 1 – 25 of 36) sorted by relevance

12

/unit/src/
H A Dnxt_var.c154 hash = decl->field_hash(fields->mem_pool, &str); in nxt_var_decl_get()
159 f = nxt_var_field_add(fields, &str, (uint32_t) hash); in nxt_var_decl_get()
188 field = fields->elts; in nxt_var_field_add()
190 for (i = 0; i < fields->nelts; i++) { in nxt_var_field_add()
198 field = nxt_array_add(fields); in nxt_var_field_add()
205 field->index = fields->nelts - 1; in nxt_var_field_add()
212 nxt_var_field_get(nxt_array_t *fields, uint16_t index) in nxt_var_field_get() argument
217 field = fields->elts; in nxt_var_field_get()
218 nfields = fields->nelts; in nxt_var_field_get()
392 decl = nxt_var_decl_get(&part, fields, &index); in nxt_var_compile()
[all …]
H A Dnxt_var.h51 nxt_var_field_t *nxt_var_field_get(nxt_array_t *fields, uint16_t index);
53 nxt_var_t *nxt_var_compile(nxt_str_t *str, nxt_mp_t *mp, nxt_array_t *fields,
55 nxt_int_t nxt_var_test(nxt_str_t *str, nxt_array_t *fields, u_char *error);
H A Dnxt_http_error.c43 r->resp.fields = nxt_list_create(r->mem_pool, 8, sizeof(nxt_http_field_t)); in nxt_http_request_error()
44 if (nxt_slow_path(r->resp.fields == NULL)) { in nxt_http_request_error()
48 content_type = nxt_list_zero_add(r->resp.fields); in nxt_http_request_error()
H A Dnxt_unit_response.h23 nxt_unit_field_t fields[]; member
H A Dnxt_http_request.c16 nxt_http_forward_t *forward, nxt_array_t *fields);
261 if (nxt_slow_path(r->resp.fields == NULL)) { in nxt_http_request_create()
367 nxt_list_each(f, r->fields) { in nxt_http_request_forward()
375 fields = nxt_array_add(client_ip_fields); in nxt_http_request_forward()
376 if (nxt_slow_path(fields == NULL)) { in nxt_http_request_forward()
380 *fields = f; in nxt_http_request_forward()
417 f = (nxt_http_field_t **) fields->elts; in nxt_http_request_forward_client_ip()
419 i = fields->nelts; in nxt_http_request_forward_client_ip()
629 server = nxt_list_zero_add(r->resp.fields); in nxt_http_request_header_send()
637 date = nxt_list_zero_add(r->resp.fields); in nxt_http_request_header_send()
[all …]
H A Dnxt_unit_request.h48 nxt_unit_field_t fields[]; member
H A Dnxt_http_parse.h50 nxt_list_t *fields; member
126 nxt_int_t nxt_http_fields_process(nxt_list_t *fields, nxt_lvlhsh_t *hash,
H A Dnxt_http.h108 nxt_list_t *fields; member
122 nxt_list_t *fields; member
154 nxt_list_t *fields; member
H A Dnxt_http_parse.c114 rp->fields = nxt_list_create(mp, 8, sizeof(nxt_http_field_t)); in nxt_http_parse_request_init()
115 if (nxt_slow_path(rp->fields == NULL)) { in nxt_http_parse_request_init()
798 field = nxt_list_add(rp->fields); in nxt_http_parse_field_end()
1260 nxt_http_fields_process(nxt_list_t *fields, nxt_lvlhsh_t *hash, void *ctx) in nxt_http_fields_process() argument
1265 nxt_list_each(field, fields) { in nxt_http_fields_process()
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;
1379 f_end = r->fields + r->fields_count;
1380 for (f = r->fields; f < f_end; f++) {
1388 f = r->fields + r->content_length_field;
1395 f = r->fields + r->content_type_field;
H A Dnxt_http_proxy.c260 nxt_list_each(field, peer->fields) { in nxt_http_proxy_header_read()
267 f = nxt_list_add(r->resp.fields); in nxt_http_proxy_header_read()
H A Dnxt_h1proto.c656 r->fields = h1p->parser.fields; in nxt_h1p_header_process()
658 ret = nxt_http_fields_process(r->fields, &nxt_h1p_fields_hash, r); in nxt_h1p_header_process()
1307 nxt_list_each(field, r->resp.fields) { in nxt_h1p_request_header_send()
1328 nxt_list_each(field, r->resp.fields) { in nxt_h1p_request_header_send()
1599 if (r->fields == NULL) { in nxt_h1p_conn_request_error()
1635 if (r->fields == NULL) { in nxt_h1p_conn_request_timeout()
2270 nxt_list_each(field, r->fields) { in nxt_h1p_peer_header_send()
2293 nxt_list_each(field, r->fields) { in nxt_h1p_peer_header_send()
2523 peer->fields = peer->proto.h1->parser.fields; in nxt_h1p_peer_header_read_done()
2525 ret = nxt_http_fields_process(peer->fields, in nxt_h1p_peer_header_read_done()
H A Dnxt_unit.c1930 nxt_unit_field_t *fields, f; in nxt_unit_request_group_dup_fields() local
1940 fields = r->fields; in nxt_unit_request_group_dup_fields()
1945 switch (fields[i].hash) { in nxt_unit_request_group_dup_fields()
1978 if (fields[i].hash != fields[j].hash in nxt_unit_request_group_dup_fields()
1979 || fields[i].name_length != fields[j].name_length in nxt_unit_request_group_dup_fields()
1987 f = fields[j]; in nxt_unit_request_group_dup_fields()
1991 fields[j] = fields[j - 1]; in nxt_unit_request_group_dup_fields()
1997 fields[j] = f; in nxt_unit_request_group_dup_fields()
2134 f = resp->fields; in nxt_unit_response_realloc()
2137 src = req->response->fields + i; in nxt_unit_response_realloc()
[all …]
H A Dnxt_http_return.c192 field = nxt_list_zero_add(r->resp.fields); in nxt_http_return_send_ready()
H A Dnxt_http_static.c512 field = nxt_list_zero_add(r->resp.fields); in nxt_http_static_send_ready()
529 field = nxt_list_zero_add(r->resp.fields); in nxt_http_static_send_ready()
558 field = nxt_list_zero_add(r->resp.fields); in nxt_http_static_send_ready()
606 field = nxt_list_zero_add(r->resp.fields); in nxt_http_static_send_ready()
/unit/test/unit/
H A Dhttp.py290 def form_encode(self, fields): argument
293 for _, value in fields.items():
299 body, content_type = self.multipart_encode(fields)
302 body, content_type = self.form_url_encode(fields)
306 def form_url_encode(self, fields): argument
308 "%s=%s" % (name, value) for name, value in fields.items()
312 def multipart_encode(self, fields): argument
317 for field, value in fields.items():
/unit/go/
H A Dresponse.go67 fields := 0
72 fields++
77 C.nxt_unit_response_init(r.c_req, C.uint16_t(code), C.uint32_t(fields),
H A Drequest.go80 fields := get_fields(req)
82 for i := 0; i < len(fields); i++ {
83 f := &fields[i]
H A Dnxt_cgo_lib.h18 NXT_FIELDS_OFFSET = offsetof(nxt_unit_request_t, fields)
/unit/src/java/
H A Dnxt_jni_Request.c287 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()
336 f - r->fields); 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()
H A Dnxt_jni_Response.c396 f = resp->fields + resp->fields_count; in nxt_java_add_int_header()
449 res = nxt_java_findHeader(resp->fields, in nxt_java_Response_containsHeader()
450 resp->fields + resp->fields_count, in nxt_java_Response_containsHeader()
488 f = nxt_java_findHeader(req->response->fields, in nxt_java_Response_getHeader()
520 return nxt_java_newHeaderNamesEnumeration(env, req->response->fields, in nxt_java_Response_getHeaderNames()
557 f = nxt_java_findHeader(resp->fields, resp->fields + resp->fields_count, in nxt_java_Response_getHeaders()
563 f = resp->fields + resp->fields_count; in nxt_java_Response_getHeaders()
567 f - resp->fields); in nxt_java_Response_getHeaders()
681 f = resp->fields; in nxt_java_response_set_header()
803 f = resp->fields; in nxt_java_response_remove_header()
[all …]
/unit/src/test/
H A Dnxt_http_parse_test.c34 nxt_http_parse_test_fields_t fields; member
337 { .fields = { NXT_OK, 1 } }
346 { .fields = { NXT_ERROR, 1 } }
353 { .fields = { NXT_ERROR, 0 } }
562 rp.discard_unsafe_fields = test->data.fields.discard_unsafe_fields; in nxt_http_parse_test()
693 if (nxt_slow_path(nxt_http_fields_process(rp.fields, hash, NULL) in nxt_http_parse_test_bench()
801 rc = nxt_http_fields_process(rp->fields, &nxt_http_test_fields_hash, NULL); in nxt_http_parse_test_fields()
803 if (rc != data->fields.result) { in nxt_http_parse_test_fields()
807 request, rc, data->fields.result); in nxt_http_parse_test_fields()
/unit/src/ruby/
H A Dnxt_ruby.c766 f = r->fields + i; in nxt_ruby_read_request()
774 f = r->fields + r->content_length_field; in nxt_ruby_read_request()
781 f = r->fields + r->content_type_field; in nxt_ruby_read_request()
828 uint32_t fields; member
854 headers_info.fields = 0; in nxt_ruby_rack_result_headers()
865 headers_info.fields, headers_info.size); in nxt_ruby_rack_result_headers()
911 headers_info->fields++; in nxt_ruby_hash_info()
919 headers_info->fields++; in nxt_ruby_hash_info()
/unit/src/perl/
H A Dnxt_perl_psgi.c681 f = r->fields + i; in nxt_perl_psgi_env_create()
689 f = r->fields + r->content_length_field; in nxt_perl_psgi_env_create()
696 f = r->fields + r->content_type_field; in nxt_perl_psgi_env_create()
787 uint32_t fields, size; in nxt_perl_psgi_result_head() local
813 fields = 0; in nxt_perl_psgi_result_head()
830 fields++; in nxt_perl_psgi_result_head()
834 rc = nxt_unit_response_init(req, status, fields, size); in nxt_perl_psgi_result_head()
/unit/src/python/
H A Dnxt_python_wsgi.c633 f = r->fields + i; in nxt_python_get_environ()
637 f2 = r->fields + j; in nxt_python_get_environ()
654 f = r->fields + r->content_length_field; in nxt_python_get_environ()
661 f = r->fields + r->content_type_field; in nxt_python_get_environ()
1040 if (pctx->req->response->fields[i].hash == NXT_UNIT_HASH_CONTENT_LENGTH) { in nxt_python_response_add_field()

12