| /lighttpd1.4/tests/ |
| H A D | fcgi-responder.c | 92 for (size_t offset = 0, part; offset != len; offset += part) { in fcgi_puts() local 93 part = len - offset > FCGI_MAX_LENGTH ? FCGI_MAX_LENGTH : len - offset; in fcgi_puts() 262 | buf[offset+FCGI_HEADER_LEN+1]; in fcgi_dispatch_packet() 295 ssize_t offset = 0; in fcgi_recv_packet() local 307 return offset; in fcgi_recv_packet() 314 ssize_t rd = 0, offset = 0; in fcgi_recv() local 333 rd = recv(fd, buf+offset, sizeof(buf)-offset, MSG_DONTWAIT); in fcgi_recv() 337 offset += rd; in fcgi_recv() 342 offset -= rd; in fcgi_recv() 343 if (offset) in fcgi_recv() [all …]
|
| H A D | scgi-responder.c | 58 ssize_t rd = 0, offset = 0; in scgi_process() local 79 rd = recv(fd, buf+offset, sizeof(buf)-offset, MSG_DONTWAIT); in scgi_process() 82 offset += rd; in scgi_process() 84 p = memchr(buf, ':', offset); in scgi_process() 91 } while (NULL == (p = memchr(buf,':',offset)) && offset < 21); in scgi_process() 101 while ((ssize_t)rlen < offset) { in scgi_process() 114 rd = recv(fd, buf+offset, sizeof(buf)-offset, MSG_DONTWAIT); in scgi_process() 117 offset += rd; in scgi_process() 125 if (offset < (ssize_t)rlen) in scgi_process() 152 cl -= (offset - (r+rlen+1 - buf)); in scgi_process()
|
| /lighttpd1.4/src/ |
| H A D | mod_ssi.c | 221 size_t offset; member 274 && (t->input[t->offset] == ' ' || t->input[t->offset] == '\t')) { in ssi_expr_tokenizer() 275 ++t->offset; in ssi_expr_tokenizer() 291 t->offset++; in ssi_expr_tokenizer() 341 t->offset++; in ssi_expr_tokenizer() 345 t->offset++; in ssi_expr_tokenizer() 351 while (t->input[t->offset + i] && t->input[t->offset + i] != '\'') in ssi_expr_tokenizer() 522 t.offset = 0; in ssi_eval_expr() 1469 offset = 0; in mod_ssi_read_fd() 1471 while (0 < (rd = read(fd, buf+offset, bufsz-offset))) { in mod_ssi_read_fd() [all …]
|
| H A D | chunk.c | 56 #define mmap_align_offset(offset) ((offset) & chunk_pagemask) argument 116 c->offset = 0; in chunk_init() 220 c->offset = 0; in chunk_reset() 483 c->offset = offset; in __attribute_nonnull__() 737 c->offset += len; in chunkqueue_steal() 1241 offset = 0; in chunkqueue_append_cq_range() 1294 c->offset = 0; in chunkqueue_compact_mem_offset() 1416 off_t offset = c->offset; in chunkqueue_write_chunk_file() local 1519 filec->offset+offset); in chunkqueue_small_resp_optim() 1527 if (offset) in chunkqueue_small_resp_optim() [all …]
|
| H A D | chunk.h | 30 off_t offset; member 57 ssize_t chunk_file_pread (int fd, void *buf, size_t count, off_t offset); 191 chunk_file_view_dptr (const chunk_file_view * const cfv, off_t offset); 193 chunk_file_view_dptr (const chunk_file_view * const cfv, off_t offset) in chunk_file_view_dptr() argument 195 return cfv->mptr - cfv->foff + offset; in chunk_file_view_dptr() 201 chunk_file_view_dlen (const chunk_file_view * const cfv, off_t offset); 203 chunk_file_view_dlen (const chunk_file_view * const cfv, off_t offset) in chunk_file_view_dlen() argument 205 return cfv->mlen + cfv->foff - offset; in chunk_file_view_dlen() 218 ? c->file.length - c->offset >= 131072 /* TBD: min chunk size to mmap */ in chunkqueue_chunk_file_view() 219 : (c->offset - cfv->foff < 0 in chunkqueue_chunk_file_view() [all …]
|
| H A D | network_write.c | 151 off_t c_len = (off_t)buffer_clen(c->mem) - c->offset; in network_write_mem_chunk() 166 off_t toSend = c->file.length - c->offset; in network_write_file_chunk_no_mmap() 175 toSend = chunk_file_pread(c->file.fd, buf, toSend, c->offset); in network_write_file_chunk_no_mmap() 207 off_t toSend = c->file.length - c->offset; in network_write_file_chunk_mmap() 211 const off_t mmap_avail = chunk_file_view_dlen(cfv, c->offset); in network_write_file_chunk_mmap() 298 off_t offset; in network_write_file_chunk_sendfile() local 302 offset = c->offset; in network_write_file_chunk_sendfile() 303 toSend = c->file.length - c->offset; in network_write_file_chunk_sendfile() 314 wr = sendfile(fd, c->file.fd, &offset, toSend); in network_write_file_chunk_sendfile() 320 wr = sendfile(c->file.fd, fd, offset, &written, NULL, 0); in network_write_file_chunk_sendfile() [all …]
|
| H A D | plugin.c | 287 if (0 == offset) return HANDLER_GO_ON; in plugins_call_fn_req_data() 289 (((uintptr_t)plugin_slots) + offset); in plugins_call_fn_req_data() 300 if (0 == offset) return HANDLER_GO_ON; in plugins_call_fn_con_data() 302 (((uintptr_t)plugin_slots) + offset); in plugins_call_fn_con_data() 311 if (0 == offset) return HANDLER_GO_ON; in plugins_call_fn_srv_data() 313 (((uintptr_t)srv->plugin_slots) + offset); in plugins_call_fn_srv_data() 322 if (0 == offset) return; in plugins_call_fn_srv_data_all() 392 const uint32_t offset = in plugins_call_handle_waitpid() local 394 if (0 == offset) return HANDLER_GO_ON; in plugins_call_handle_waitpid() 421 if (0 == offset) return; in plugins_call_init_reverse() [all …]
|
| H A D | mod_scgi.c | 187 size_t offset; in scgi_create_env() local 212 offset = 10 - len; in scgi_create_env() 213 memcpy(b->ptr+offset, tb->ptr, len); in scgi_create_env() 225 offset = 10 - 4; in scgi_create_env() 226 b->ptr[offset] = 0; in scgi_create_env() 228 b->ptr[offset+2] = (len >> 8) & 0xff; in scgi_create_env() 229 b->ptr[offset+3] = 0; in scgi_create_env() 232 hctx->wb_reqlen = buffer_clen(b) - offset; in scgi_create_env() 234 chunkqueue_mark_written(&hctx->wb, offset); in scgi_create_env() 235 hctx->wb.bytes_in -= (off_t)offset; in scgi_create_env() [all …]
|
| H A D | http_chunk.c | 61 …ad_fd_range(request_st * const r, const buffer * const fn, const int fd, off_t offset, off_t len) { in http_chunk_append_read_fd_range() argument 76 const off_t foff = offset; in http_chunk_append_read_fd_range() 77 offset = 0; in http_chunk_append_read_fd_range() 79 rd = chunk_file_pread(fd, b->ptr+offset, (size_t)len, foff+offset); in http_chunk_append_read_fd_range() 80 } while (rd > 0 && (offset += rd, len -= rd)); in http_chunk_append_read_fd_range() 81 buffer_commit(b, offset); in http_chunk_append_read_fd_range() 91 …file_ref_range(request_st * const r, stat_cache_entry * const sce, const off_t offset, off_t len) { in http_chunk_append_file_ref_range() argument 94 if (sce->st.st_size - offset < len) in http_chunk_append_file_ref_range() 95 len = sce->st.st_size - offset; in http_chunk_append_file_ref_range() 104 chunkqueue_append_file_fd(cq, fn, fd, offset, len); in http_chunk_append_file_ref_range() [all …]
|
| H A D | configfile.c | 1824 int offset; member 1873 t->offset++; in config_tokenizer() 1957 t->offset++; in config_tokenizer() 1987 t->offset++; in config_tokenizer() 1995 t->offset++; in config_tokenizer() 2000 t->offset++; in config_tokenizer() 2020 t->offset += 2; in config_tokenizer() 2024 t->offset++; in config_tokenizer() 2045 t->offset++; in config_tokenizer() 2049 t->offset++; in config_tokenizer() [all …]
|
| H A D | sys-mmap.h | 34 mmap (void *addr, size_t length, int prot, int flags, int fd, off_t offset) in mmap() argument 49 (sizeof(off_t) > 4) ? offset >> 32 : 0, in mmap() 50 offset & 0xffffffff, length, addr); in mmap()
|
| H A D | connections.c | 599 return (c && (size_t)c->offset + olen < buffer_clen(c->mem)) in connection_read_header_more() 669 clen = buffer_clen(c->mem) - c->offset; in connection_handle_read_state() 710 if (((unsigned char *)c->mem->ptr)[c->offset] < 32) { in connection_handle_read_state() 715 c->mem->ptr[c->offset] == 0x16 in connection_handle_read_state() 1623 p = b->ptr+c->offset; in connection_handle_read_post_chunked_crlf() 1626 len = buffer_clen(b) - (size_t)c->offset; in connection_handle_read_post_chunked_crlf() 1631 len = buffer_clen(b) - (size_t)c->offset; in connection_handle_read_post_chunked_crlf() 1633 p = b->ptr+c->offset; in connection_handle_read_post_chunked_crlf() 1654 p = strchr(c->mem->ptr+c->offset, '\n'); in connection_handle_read_post_chunked() 1656 off_t hsz = p + 1 - (c->mem->ptr+c->offset); in connection_handle_read_post_chunked() [all …]
|
| H A D | http_chunk.h | 18 void http_chunk_append_file_fd_range(request_st *r, const buffer *fn, int fd, off_t offset, off_t l… 19 void http_chunk_append_file_ref_range(request_st *r, struct stat_cache_entry *sce, off_t offset, of…
|
| H A D | ck.c | 372 unw_word_t offset; in ck_backtrace() local 399 offset = 0; in ck_backtrace() 400 rc = unw_get_proc_name(&cursor, name, sizeof(name), &offset); in ck_backtrace() 418 frame,(long unsigned)(uintptr_t)ip,(unsigned int)offset,name); in ck_backtrace()
|
| H A D | mod_fastcgi.c | 192 off_t offset, weWant; in fcgi_stdin_append() local 198 for (offset = 0; offset != req_cqlen; offset += weWant) { in fcgi_stdin_append() 199 weWant = req_cqlen - offset > FCGI_MAX_LENGTH ? FCGI_MAX_LENGTH : req_cqlen - offset; in fcgi_stdin_append()
|
| H A D | buffer.c | 461 void buffer_substr_replace (buffer * const restrict b, const size_t offset, in buffer_substr_replace() argument 469 memmove(b->ptr+offset+rlen, b->ptr+offset+len, blen-offset-len); in buffer_substr_replace() 472 memcpy(b->ptr+offset, replace->ptr, rlen); in buffer_substr_replace() 475 memmove(b->ptr+offset+rlen, b->ptr+offset+len, blen-offset-len); in buffer_substr_replace()
|
| H A D | h2.c | 1210 uint8_t *s = (uint8_t *)(c->mem->ptr + c->offset); in h2_recv_continuation() 1221 s = (uint8_t *)(c->mem->ptr + c->offset); in h2_recv_continuation() 1246 s = (uint8_t *)(c->mem->ptr + c->offset); in h2_recv_continuation() 1334 buffer_truncate(c->mem, n + (uint32_t)c->offset); in h2_recv_continuation() 1723 uint32_t clen = buffer_clen(c->mem) - c->offset; in h2_parse_frames() 1743 s = (uint8_t *)(c->mem->ptr + c->offset); in h2_parse_frames() 1754 s = (uint8_t *)(c->mem->ptr + c->offset); in h2_parse_frames() 1862 uint32_t clen = buffer_clen(c->mem) - c->offset; in h2_want_read() 1867 uint8_t *s = (uint8_t *)(c->mem->ptr + c->offset); in h2_want_read() 1880 s = (uint8_t *)(c->mem->ptr + c->offset); in h2_want_read() [all …]
|
| H A D | mod_webdav.c | 778 s = c->mem->ptr + c->offset; in webdav_xml_log_response() 2274 off_t offset = 0; in webdav_fcopyfile_sz() local 2276 while (offset < isz && sendfile(ifd,ofd,&offset,(size_t)(isz-offset)) >= 0); in webdav_fcopyfile_sz() 2278 while (offset < isz in webdav_fcopyfile_sz() 2279 && sendfile(ifd, ofd, &offset, in webdav_fcopyfile_sz() 2281 ? isz-offset in webdav_fcopyfile_sz() 2285 if (offset == isz) in webdav_fcopyfile_sz() 3824 ? chunk_file_view_dptr(cfv, c->offset) in webdav_mmap_file_chunk() 4762 off_t offset; in mod_webdav_put_range() local 4829 loff_t ooff = offset; in mod_webdav_put_range() [all …]
|
| H A D | mod_expire.c | 43 static time_t mod_expire_get_offset(log_error_st *errh, const buffer *expire, time_t *offset) { in mod_expire_get_offset() argument 139 *offset = retts; in mod_expire_get_offset()
|
| H A D | http_range.c | 178 c->file.length = c->offset + ranges[1] - ranges[0] + 1; in http_range_single() 180 c->mem->used = c->offset + ranges[1] - ranges[0] + 1 + 1; in http_range_single()
|
| H A D | mod_deflate.c | 1504 const char *in = chunk_file_view_dptr(c->file.view, c->offset); in mod_deflate_using_libdeflate_setjmp_cb() 1615 rd = chunk_file_pread(c->file.fd, p, (size_t)psz, c->offset+n); in mod_deflate_file_chunk_no_mmap() 1656 const char * const p = chunk_file_view_dptr(cfv, c->offset); in mod_deflate_file_chunk_mmap() 1657 off_t len = chunk_file_view_dlen(cfv, c->offset); in mod_deflate_file_chunk_mmap() 1716 len = buffer_clen(c->mem) - c->offset; in deflate_compress_response() 1718 if (mod_deflate_compress(hctx, (unsigned char *)c->mem->ptr+c->offset, len) < 0) { in deflate_compress_response() 1724 len = c->file.length - c->offset; in deflate_compress_response() 2034 && r->write_queue.first->offset == 0 in REQUEST_FUNC() 2094 && chunk_file_view_dlen(c->file.view, c->offset) >= len) { /*(cfv)*/ in REQUEST_FUNC()
|
| H A D | mod_wstunnel.c | 941 char *frame = c->mem->ptr+c->offset; in recv_ietf_00() 943 size_t flen = (size_t)(buffer_clen(c->mem) - c->offset); in recv_ietf_00() 1128 char *frame = c->mem->ptr+c->offset; in recv_rfc_6455() 1130 size_t flen = (size_t)(buffer_clen(c->mem) - c->offset); in recv_rfc_6455()
|
| H A D | mod_openssl.c | 1503 int offset = 0; in mod_openssl_asn1_time_to_posix() local 1505 offset = ((s[1]-'0')*10 + (s[2]-'0')) * 3600 in mod_openssl_asn1_time_to_posix() 1507 if (*s == '-') offset = -offset; in mod_openssl_asn1_time_to_posix() 1519 return (t != -1) ? TIME64_CAST(t) + offset : t; in mod_openssl_asn1_time_to_posix() 3100 off_t len = c->file.length - c->offset; in connection_write_cq_ssl_ktls() 3107 SSL_sendfile(hctx->ssl, c->file.fd, c->offset, (size_t)len, 0); in connection_write_cq_ssl_ktls()
|
| /lighttpd1.4/src/ls-hpack/ |
| H A D | lsxpack_header.h | 130 char *out, size_t offset, size_t len) in lsxpack_header_prepare_decode() argument 134 assert(offset <= LSXPACK_MAX_STRLEN); in lsxpack_header_prepare_decode() 135 hdr->name_offset = (lsxpack_strlen_t)offset; in lsxpack_header_prepare_decode()
|
| /lighttpd1.4/doc/outdated/ |
| H A D | magnet.txt | 144 * offset = <number> [default: 0] 145 * length = <number> [default: size of the file - offset] 239 { filename = lighty.env["physical.path"], offset = get["start"] } }
|