Home
last modified time | relevance | path

Searched refs:len (Results 1 – 25 of 112) sorted by last modified time

12345

/unit/src/
H A Dnxt_websocket_accept.c12 nxt_websocket_base64_encode(u_char *d, const uint8_t *s, size_t len) in nxt_websocket_base64_encode() argument
18 while (len > 2) { in nxt_websocket_base64_encode()
29 len -= 3; in nxt_websocket_base64_encode()
32 if (len > 0) { in nxt_websocket_base64_encode()
36 if (len == 1) { in nxt_websocket_base64_encode()
H A Dnxt_unit.c100 static ssize_t nxt_unit_buf_read(nxt_unit_buf_t **b, uint64_t *len, void *dst,
3198 nxt_unit_buf_read(nxt_unit_buf_t **b, uint64_t *len, void *dst, size_t size) in nxt_unit_buf_read() argument
3236 *len -= read; in nxt_unit_buf_read()
H A Dnxt_time_parse.c16 nxt_time_parse(const u_char *p, size_t len) in nxt_time_parse() argument
36 end = p + len; in nxt_time_parse()
311 nxt_term_parse(const u_char *p, size_t len, nxt_bool_t seconds) in nxt_term_parse() argument
342 end = p + len; in nxt_term_parse()
H A Dnxt_http_request.c18 nxt_http_request_t *r, u_char *start, size_t len);
410 nxt_int_t ret, i, len; in nxt_http_request_forward_client_ip() local
421 len = f[i]->value_length; in nxt_http_request_forward_client_ip()
424 for (p = start + len - 1; p > start; p--, len--) { in nxt_http_request_forward_client_ip()
437 sa = nxt_http_request_client_ip_sockaddr(r, p, len - (p - start)); in nxt_http_request_forward_client_ip()
458 len = p - 1 - start; in nxt_http_request_forward_client_ip()
460 } while (len > 0); in nxt_http_request_forward_client_ip()
467 size_t len) in nxt_http_request_client_ip_sockaddr() argument
473 addr.length = len; in nxt_http_request_client_ip_sockaddr()
H A Dnxt_http_parse.c523 size_t len; in nxt_http_parse_field_name() local
581 len = p - *pos; in nxt_http_parse_field_name()
583 if (nxt_slow_path(len > NXT_HTTP_MAX_FIELD_NAME)) { in nxt_http_parse_field_name()
588 rp->field_name.length = len; in nxt_http_parse_field_name()
601 len = p - *pos; in nxt_http_parse_field_name()
609 rp->field_name.length = len; in nxt_http_parse_field_name()
630 size_t len; in nxt_http_parse_field_value() local
660 len = p - start; in nxt_http_parse_field_value()
666 rp->field_value.length = len; in nxt_http_parse_field_value()
693 len = p - start; in nxt_http_parse_field_value()
[all …]
H A Dnxt_conf.c2307 size_t len; in nxt_conf_json_array_length() local
2314 len = 2; in nxt_conf_json_array_length()
2341 return len + n; in nxt_conf_json_array_length()
2409 len = 2; in nxt_conf_json_object_length()
2434 len += pretty->level + 2; in nxt_conf_json_object_length()
2437 return len; in nxt_conf_json_object_length()
2517 size_t len; in nxt_conf_json_escape_length() local
2519 len = size; in nxt_conf_json_escape_length()
2525 len++; in nxt_conf_json_escape_length()
2535 len++; in nxt_conf_json_escape_length()
[all …]
H A Dnxt_openssl.c632 size_t len; local
685 len = nxt_base64_decode(buf, value.start, value.length);
689 if (len == 48) {
852 int len; local
910 len = X509_NAME_get_text_by_NID(x509_name, NID_commonName,
912 if (len <= 0) {
918 domain.start = nxt_mp_nget(mp, len + 1);
925 len + 1);
H A Dnxt_mem_map.h49 #define nxt_mem_map(addr, ctx, len, protection, flags, fd, offset) \ argument
50 nxt_mem_mmap(addr, len, protection, flags, fd, offset)
53 #define nxt_mem_unmap(addr, ctx, len) \ argument
54 nxt_mem_munmap(addr, len)
57 NXT_EXPORT void *nxt_mem_mmap(void *addr, size_t len, nxt_uint_t protection,
59 NXT_EXPORT void nxt_mem_munmap(void *addr, size_t len);
H A Dnxt_fastcgi_source.c16 uint32_t len; member
25 p[1] = (u_char) len; len >>= 8; \
207 param.len = 0; in nxt_fastcgi_request_create()
260 if (nxt_fast_path(len >= param.len)) { in nxt_fastcgi_request_create()
261 len = param.len; in nxt_fastcgi_request_create()
265 param.len -= len; in nxt_fastcgi_request_create()
272 size += len; in nxt_fastcgi_request_create()
371 param->len = fs->u.request.name.len; in nxt_fastcgi_next_param()
377 param->len = fs->u.request.value.len; in nxt_fastcgi_next_param()
555 if (len > 255) { in nxt_fastcgi_source_header_process()
[all …]
H A Dnxt_file.h25 size_t len; member
34 #define nxt_file_name_alloc(mem_pool, len) \ argument
35 nxt_mp_nget(mem_pool, len)
38 #define nxt_file_name_copy(dst, src, len) \ argument
39 nxt_cpymem(dst, src, len)
42 #define nxt_file_name_add(dst, src, len) \ argument
43 nxt_cpymem(dst, src, len)
209 NXT_EXPORT size_t nxt_dir_current(char *buf, size_t len);
H A Dnxt_cache.c141 lhq.key.len = q->key_len; in nxt_cache_query()
425 lhq.key.len = node->key_len; in nxt_cache_update()
H A Dnxt_djb_hash.h14 NXT_EXPORT uint32_t nxt_djb_hash(const void *data, size_t len);
15 NXT_EXPORT uint32_t nxt_djb_hash_lowcase(const void *data, size_t len);
H A Dnxt_clone.c87 int len, mapfd; in nxt_clone_credential_map_write() local
108 len = nxt_strlen(mapinfo); in nxt_clone_credential_map_write()
110 n = write(mapfd, (char *)mapinfo, len); in nxt_clone_credential_map_write()
111 if (nxt_slow_path(n != len)) { in nxt_clone_credential_map_write()
139 nxt_int_t ret, len; in nxt_clone_credential_map_set() local
146 len = sizeof(u_char) * (10 + 10 + 10 + 2 + 1); in nxt_clone_credential_map_set()
149 len = len * map->size + 1; in nxt_clone_credential_map_set()
151 mapinfo = nxt_malloc(len); in nxt_clone_credential_map_set()
157 end = mapinfo + len; in nxt_clone_credential_map_set()
178 mapinfo = nxt_malloc(len); in nxt_clone_credential_map_set()
[all …]
/unit/test/
H A Dtest_static.py140 len(self.get(url='/large', read_buffer_size=1024 * 1024)['body'])
H A Dtest_return.py48 assert len(re.findall('200 OK', resp)) == 10
49 assert len(re.findall('Connection:', resp)) == 1
50 assert len(re.findall('Connection: close', resp)) == 1
H A Dtest_ruby_application.py42 'Content-Length': str(len(body)),
380 assert len(headers['X-Copyright']) > 0, 'RUBY_COPYRIGHT'
381 assert len(headers['X-Description']) > 0, 'RUBY_DESCRIPTION'
382 assert len(headers['X-Engine']) > 0, 'RUBY_ENGINE'
383 assert len(headers['X-Engine-Version']) > 0, 'RUBY_ENGINE_VERSION'
384 assert len(headers['X-Patchlevel']) > 0, 'RUBY_PATCHLEVEL'
385 assert len(headers['X-Platform']) > 0, 'RUBY_PLATFORM'
386 assert len(headers['X-Release-Date']) > 0, 'RUBY_RELEASE_DATE'
387 assert len(headers['X-Revision']) > 0, 'RUBY_REVISION'
388 assert len(headers['X-Version']) > 0, 'RUBY_VERSION'
[all …]
H A Dtest_tls.py272 assert len(chain) == 1, 'certificate chain length'
327 assert len(chain) == 1, 'certificate chain end length'
351 assert len(chain) == 1, 'certificate chain int length'
370 assert len(chain) == 2, 'certificate chain end-int length'
429 assert len(chain) == chain_length - 1, 'certificate chain length'
H A Dtest_python_application.py30 % (len(body), body.encode()),
50 'Content-Length': str(len(body)),
566 assert len(self.findall(r'Traceback')) == 1, 'traceback count 1'
585 assert len(self.findall(r'Traceback')) == 2, 'traceback count 2'
602 assert len(self.findall(r'Traceback')) == 3, 'traceback count 3'
620 assert len(self.findall(r'Traceback')) == 4, 'traceback count 4'
637 assert len(self.findall(r'Traceback')) == 5, 'traceback count 5'
654 assert len(self.findall(r'Traceback')) == 6, 'traceback count 6'
673 assert len(self.findall(r'Traceback')) == 8, 'traceback count 8'
833 assert len(socks) == len(threads), 'threads differs'
/unit/src/ruby/
H A Dnxt_ruby_stream_io.c222 long len; in nxt_ruby_stream_io_write() local
231 len = nxt_ruby_stream_io_s_write(rctx, RARRAY_PTR(args)[0]); in nxt_ruby_stream_io_write()
233 return LONG2FIX(len); in nxt_ruby_stream_io_write()
H A Dnxt_ruby.c60 nxt_unit_sptr_t *sptr, uint32_t len);
430 size_t len; in nxt_ruby_script_basename() local
447 len = script->length - (last - script->start); in nxt_ruby_script_basename()
451 len = script->length; in nxt_ruby_script_basename()
454 return rb_str_new((const char *) last, len); in nxt_ruby_script_basename()
821 nxt_unit_sptr_t *sptr, uint32_t len) in nxt_ruby_add_sptr() argument
827 rb_hash_aset(hash_env, name, rb_str_new(str, len)); in nxt_ruby_add_sptr()
/unit/src/python/
H A Dnxt_python.c71 size_t len, size; in nxt_python_start() local
97 len = nxt_strlen(c->home); in nxt_python_start()
101 path = nxt_malloc(len + sizeof(pyvenv)); in nxt_python_start()
107 nxt_memcpy(path, c->home, len); in nxt_python_start()
108 nxt_memcpy(path + len, pyvenv, sizeof(pyvenv)); in nxt_python_start()
115 size = (len + sizeof(bin_python)) * sizeof(wchar_t); in nxt_python_start()
118 size = (len + 1) * sizeof(wchar_t); in nxt_python_start()
128 mbstowcs(nxt_py_home, c->home, len); in nxt_python_start()
133 mbstowcs(nxt_py_home, c->home, len + 1); in nxt_python_start()
138 nxt_py_home = nxt_malloc(len + 1); in nxt_python_start()
[all …]
/unit/src/perl/
H A Dnxt_perl_psgi.c67 const char *name, uint32_t name_len, const char *str, uint32_t len);
203 size_t len; in XS() local
214 body = SvPV(ST(1), len); in XS()
218 rc = nxt_unit_response_write(pctx->req, body, len); in XS()
225 XSRETURN_IV(len); in XS()
720 nxt_unit_sptr_get(sptr), len); in nxt_perl_psgi_add_sptr()
731 newSVpv(str, (STRLEN) len), 0); in nxt_perl_psgi_add_str()
913 size_t len; in nxt_perl_psgi_result_body_ref() local
938 body = SvPV(data, len); in nxt_perl_psgi_result_body_ref()
940 if (len == 0) { in nxt_perl_psgi_result_body_ref()
[all …]
/unit/src/java/nginx/unit/websocket/
H A DWsRemoteEndpointImplBase.java952 public void write(byte[] b, int off, int len) throws IOException { in write() argument
957 if (len == 0) { in write()
960 if ((off < 0) || (off > b.length) || (len < 0) || in write()
961 ((off + len) > b.length) || ((off + len) < 0)) { in write()
972 while (remaining < len - written) { in write()
978 buffer.put(b, off + written, len - written); in write()
1036 if (len == 0) { in write()
1039 if ((off < 0) || (off > cbuf.length) || (len < 0) || in write()
1040 ((off + len) > cbuf.length) || ((off + len) < 0)) { in write()
1051 while (remaining < len - written) { in write()
[all …]
/unit/test/unit/
H A Dcontrol.py14 url = args[0] if len(args) == 1 else url_default
22 url = args[1] if len(args) == 2 else url_default
H A Dhttp.py73 headers['Content-Length'] = len(body)
146 len_log = len(log)
200 if not len(part):
242 if len(chunks) < 3:
258 while len(chunks) >= 2:
266 assert len(chunks) == 1, 'last zero size'
273 temp_body = temp_body[size + len(crlf) :]

12345