Home
last modified time | relevance | path

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

12

/unit/src/
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.c257 if (nxt_slow_path(r->resp.fields == NULL)) { in nxt_http_request_create()
322 nxt_http_field_t *f, **fields; in nxt_http_request_client_ip() local
343 nxt_list_each(f, r->fields) { in nxt_http_request_client_ip()
349 fields = nxt_array_add(fields_arr); in nxt_http_request_client_ip()
350 if (nxt_slow_path(fields == NULL)) { in nxt_http_request_client_ip()
354 *fields = f; in nxt_http_request_client_ip()
359 fields = (nxt_http_field_t **) fields_arr->elts; in nxt_http_request_client_ip()
364 f = fields[i]; in nxt_http_request_client_ip()
554 server = nxt_list_zero_add(r->resp.fields); in nxt_http_request_header_send()
562 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_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()
2269 nxt_list_each(field, r->fields) { in nxt_h1p_peer_header_send()
2292 nxt_list_each(field, r->fields) { in nxt_h1p_peer_header_send()
2522 peer->fields = peer->proto.h1->parser.fields; in nxt_h1p_peer_header_read_done()
2524 ret = nxt_http_fields_process(peer->fields, in nxt_h1p_peer_header_read_done()
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_http_static.c495 field = nxt_list_zero_add(r->resp.fields); in nxt_http_static_send_ready()
512 field = nxt_list_zero_add(r->resp.fields); in nxt_http_static_send_ready()
541 field = nxt_list_zero_add(r->resp.fields); in nxt_http_static_send_ready()
587 field = nxt_list_zero_add(r->resp.fields); in nxt_http_static_send_ready()
H A Dnxt_unit.c1934 nxt_unit_field_t *fields, f; in nxt_unit_request_group_dup_fields() local
1944 fields = r->fields; in nxt_unit_request_group_dup_fields()
1949 switch (fields[i].hash) { in nxt_unit_request_group_dup_fields()
1982 if (fields[i].hash != fields[j].hash in nxt_unit_request_group_dup_fields()
1983 || fields[i].name_length != fields[j].name_length in nxt_unit_request_group_dup_fields()
1991 f = fields[j]; in nxt_unit_request_group_dup_fields()
1995 fields[j] = fields[j - 1]; in nxt_unit_request_group_dup_fields()
2001 fields[j] = f; in nxt_unit_request_group_dup_fields()
2138 f = resp->fields; in nxt_unit_response_realloc()
2141 src = req->response->fields + i; in nxt_unit_response_realloc()
[all …]
H A Dnxt_http_return.c189 field = nxt_list_zero_add(r->resp.fields); in nxt_http_return_send_ready()
/unit/test/unit/
H A Dhttp.py292 def form_encode(self, fields): argument
295 for _, value in fields.items():
301 body, content_type = self.multipart_encode(fields)
304 body, content_type = self.form_url_encode(fields)
308 def form_url_encode(self, fields): argument
310 "%s=%s" % (name, value) for name, value in fields.items()
314 def multipart_encode(self, fields): argument
319 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()
H A Dnxt_unit_app_test.c248 f = r->fields + i; in greeting_app_request_handler()
/unit/src/ruby/
H A Dnxt_ruby.c794 f = r->fields + i; in nxt_ruby_read_request()
802 f = r->fields + r->content_length_field; in nxt_ruby_read_request()
809 f = r->fields + r->content_type_field; in nxt_ruby_read_request()
856 uint32_t fields; member
882 headers_info.fields = 0; in nxt_ruby_rack_result_headers()
893 headers_info.fields, headers_info.size); in nxt_ruby_rack_result_headers()
939 headers_info->fields++; in nxt_ruby_hash_info()
947 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()
/unit/test/
H A Dtest_java_application.py960 fields = {
970 encoded, content_type = self.multipart_encode(fields)

12