Home
last modified time | relevance | path

Searched refs:fields (Results 1 – 25 of 37) sorted by last modified time

12

/unit/test/unit/
H A Dhttp.py295 def form_encode(self, fields): argument
298 for _, value in fields.items():
304 body, content_type = self.multipart_encode(fields)
307 body, content_type = self.form_url_encode(fields)
311 def form_url_encode(self, fields): argument
313 "%s=%s" % (name, value) for name, value in fields.items()
317 def multipart_encode(self, fields): argument
322 for field, value in fields.items():
/unit/src/
H A Dnxt_var.c151 hash = decl->field_hash(fields->mem_pool, &str); in nxt_var_decl_get()
156 f = nxt_var_field_add(fields, &str, (uint32_t) hash); in nxt_var_decl_get()
185 field = fields->elts; in nxt_var_field_add()
187 for (i = 0; i < fields->nelts; i++) { in nxt_var_field_add()
195 field = nxt_array_add(fields); in nxt_var_field_add()
202 field->index = fields->nelts - 1; in nxt_var_field_add()
209 nxt_var_field_get(nxt_array_t *fields, uint16_t index) in nxt_var_field_get() argument
214 field = fields->elts; in nxt_var_field_get()
215 nfields = fields->nelts; in nxt_var_field_get()
379 decl = nxt_var_decl_get(&part, fields, &index); in nxt_var_compile()
[all …]
H A Dnxt_var.h45 nxt_var_field_t *nxt_var_field_get(nxt_array_t *fields, uint16_t index);
47 nxt_var_t *nxt_var_compile(nxt_str_t *str, nxt_mp_t *mp, nxt_array_t *fields);
48 nxt_int_t nxt_var_test(nxt_str_t *str, nxt_array_t *fields, u_char *error);
H A Dnxt_router.c3930 for (f = resp->fields; f < resp->fields + resp->fields_count; f++) { in nxt_router_response_ready_handler()
3935 field = nxt_list_add(r->resp.fields); in nxt_router_response_ready_handler()
3961 r->resp.fields->last->nelts--; in nxt_router_response_ready_handler()
5163 nxt_fields_first(nxt_list_t *fields, nxt_fields_iter_t *i) in nxt_fields_first() argument
5165 return nxt_fields_part_first(nxt_list_part(fields), i); in nxt_fields_first()
5212 nxt_list_each(field, r->fields) { in nxt_router_prepare_msg()
5241 p = (u_char *) (req->fields + fields_count); in nxt_router_prepare_msg()
5312 dst_field = req->fields; in nxt_router_prepare_msg()
5314 for (field = nxt_fields_first(r->fields, &iter); in nxt_router_prepare_msg()
5334 req->cookie_field = dst_field - req->fields; in nxt_router_prepare_msg()
[all …]
H A Dnxt_http_static.c516 field = nxt_list_zero_add(r->resp.fields); in nxt_http_static_send_ready()
533 field = nxt_list_zero_add(r->resp.fields); in nxt_http_static_send_ready()
562 field = nxt_list_zero_add(r->resp.fields); in nxt_http_static_send_ready()
610 field = nxt_list_zero_add(r->resp.fields); in nxt_http_static_send_ready()
H A Dnxt_http_variables.c455 nxt_list_each(f, r->fields) { in nxt_http_var_header()
H A Dnxt_http_return.c196 field = nxt_list_zero_add(r->resp.fields); in nxt_http_return_send_ready()
H A Dnxt_http_route.c1889 nxt_list_each(f, r->fields) { in nxt_http_route_header()
H A Dnxt_http_js.c213 nxt_list_each(f, r->fields) { in nxt_http_js_ext_get_header()
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()
371 nxt_list_each(f, r->fields) { in nxt_http_request_forward()
379 fields = nxt_array_add(client_ip_fields); in nxt_http_request_forward()
380 if (nxt_slow_path(fields == NULL)) { in nxt_http_request_forward()
384 *fields = f; in nxt_http_request_forward()
421 f = (nxt_http_field_t **) fields->elts; in nxt_http_request_forward_client_ip()
423 i = fields->nelts; in nxt_http_request_forward_client_ip()
633 server = nxt_list_zero_add(r->resp.fields); in nxt_http_request_header_send()
641 date = nxt_list_zero_add(r->resp.fields); in nxt_http_request_header_send()
[all …]
H A Dnxt_http.h108 nxt_list_t *fields; member
122 nxt_list_t *fields; member
156 nxt_list_t *fields; member
H A Dnxt_php_sapi.c1135 f = r->fields + r->content_type_field;
1141 f = r->fields + r->cookie_field;
1147 f = r->fields + r->authorization_field;
1461 f_end = r->fields + r->fields_count;
1462 for (f = r->fields; f < f_end; f++) {
1470 f = r->fields + r->content_length_field;
1477 f = r->fields + r->content_type_field;
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_controller.c790 rc = nxt_http_fields_process(r->parser.fields, &nxt_controller_fields_hash, in nxt_controller_conn_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_request.h50 nxt_unit_field_t fields[]; member
H A Dnxt_unit.c1948 nxt_unit_field_t *fields, f; in nxt_unit_request_group_dup_fields() local
1958 fields = r->fields; in nxt_unit_request_group_dup_fields()
1963 switch (fields[i].hash) { in nxt_unit_request_group_dup_fields()
1996 if (fields[i].hash != fields[j].hash in nxt_unit_request_group_dup_fields()
1997 || fields[i].name_length != fields[j].name_length in nxt_unit_request_group_dup_fields()
2005 f = fields[j]; in nxt_unit_request_group_dup_fields()
2009 fields[j] = fields[j - 1]; in nxt_unit_request_group_dup_fields()
2015 fields[j] = f; in nxt_unit_request_group_dup_fields()
2152 f = resp->fields; in nxt_unit_response_realloc()
2155 src = req->response->fields + i; in nxt_unit_response_realloc()
[all …]
/unit/src/python/
H A Dnxt_python_wsgi.c637 f = r->fields + i; in nxt_python_get_environ()
641 f2 = r->fields + j; in nxt_python_get_environ()
658 f = r->fields + r->content_length_field; in nxt_python_get_environ()
665 f = r->fields + r->content_type_field; in nxt_python_get_environ()
1058 if (pctx->req->response->fields[i].hash == NXT_UNIT_HASH_CONTENT_LENGTH) { in nxt_python_response_add_field()
H A Dnxt_python_asgi.c695 f = r->fields + i; in nxt_py_asgi_create_http_scope()
1262 if (req->response->fields[i].hash == NXT_UNIT_HASH_CONTENT_LENGTH) { in nxt_py_asgi_add_field()
/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()
H A Dnxt_unit_app_test.c248 f = r->fields + i; in greeting_app_request_handler()
/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/test/
H A Dtest_java_application.py960 fields = {
970 encoded, content_type = self.multipart_encode(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/nodejs/unit-http/
H A Dunit.cpp600 append_header(r->fields + i, headers, raw_headers, i); in create_headers()
867 f = req->response->fields + req->response->fields_count; in response_send_headers()
893 f = req->response->fields + req->response->fields_count; in response_send_headers()

12