Home
last modified time | relevance | path

Searched refs:sce (Results 1 – 11 of 11) sorted by relevance

/lighttpd1.4/src/
H A Dstat_cache.c805 stat_cache_entry *sce = ck_calloc(1, sizeof(*sce)); in stat_cache_entry_init() local
808 return sce; in stat_cache_entry_init()
825 if (sce->content_type.size) free(sce->content_type.ptr); in stat_cache_entry_free()
826 if (sce->fd >= 0) close(sce->fd); in stat_cache_entry_free()
828 free(sce); in stat_cache_entry_free()
1070 if (!buffer_is_blank(&sce->etag)) return &sce->etag; in stat_cache_etag_get()
1074 http_etag_create(&sce->etag, &sce->st, flags); in stat_cache_etag_get()
1324 sce = NULL; in stat_cache_get_entry()
1391 return sce; in stat_cache_get_entry()
1397 if (sce->fd >= 0) return sce; in stat_cache_get_entry_open()
[all …]
H A Dmod_magnet_cache.c52 stat_cache_entry * const sce = stat_cache_get_entry_open(&sc->name, 1); in script_cache_load_script() local
54 if (NULL == sce || sce->fd < 0 || -1 == lseek(sce->fd, 0, SEEK_SET)) { in script_cache_load_script()
56 if (NULL != sce) errno = EBADF; in script_cache_load_script()
59 const buffer * const etag = stat_cache_etag_get(sce, etag_flags); in script_cache_load_script()
63 const off_t sz = sce->st.st_size; in script_cache_load_script()
69 rd = read(sce->fd, buf+off, (size_t)(sz-off)); in script_cache_load_script()
128 stat_cache_entry * const sce = stat_cache_get_entry(&sc->name); in script_cache_check_script() local
129 if (NULL == sce) { in script_cache_check_script()
134 const buffer * const etag = stat_cache_etag_get(sce, etag_flags); in script_cache_check_script()
H A Dstat_cache.h48 const buffer * stat_cache_content_type_get_by_xattr(stat_cache_entry *sce, const array *mimetypes, …
49 #define stat_cache_content_type_get(con, r) stat_cache_content_type_get_by_xattr((sce), (r)->conf.m…
51 const buffer * stat_cache_content_type_get_by_ext(stat_cache_entry *sce, const array *mimetypes);
52 #define stat_cache_content_type_get(con, r) stat_cache_content_type_get_by_ext((sce), (r)->conf.mim…
54 const buffer * stat_cache_etag_get(stat_cache_entry *sce, int flags);
H A Dhttp_chunk.c94 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()
102 const buffer * const fn = &sce->name; in http_chunk_append_file_ref_range()
103 const int fd = sce->fd; in http_chunk_append_file_ref_range()
107 d->file.ref = sce; in http_chunk_append_file_ref_range()
109 stat_cache_entry_refchg(sce, 1); in http_chunk_append_file_ref_range()
141 int http_chunk_append_file_ref(request_st * const r, stat_cache_entry * const sce) { in http_chunk_append_file_ref() argument
142 const off_t sz = sce->st.st_size; in http_chunk_append_file_ref()
144 http_chunk_append_file_ref_range(r, sce, 0, sz); in http_chunk_append_file_ref()
149 const buffer * const fn = &sce->name; in http_chunk_append_file_ref()
[all …]
H A Dhttp-header-glue.c321 if (__builtin_expect( (NULL == sce), 0) in http_response_send_file()
322 || (__builtin_expect( (sce->fd < 0), 0) && 0 != sce->st.st_size)) { in http_response_send_file()
324 if (NULL == sce) { in http_response_send_file()
330 if (sce->fd < 0 && __builtin_expect( (0 != sce->st.st_size), 0)) { in http_response_send_file()
386 stat_cache_etag_get(sce, r->conf.etag_flags); in http_response_send_file()
410 if (0 == sce->st.st_size || 0 == http_chunk_append_file_ref(r, sce)) { in http_response_send_file()
417 sce->st.st_size); in http_response_send_file()
496 stat_cache_entry *sce; in http_response_xsendfile2() local
544 if (NULL == sce) { in http_response_xsendfile2()
550 } else if (!S_ISREG(sce->st.st_mode)) { in http_response_xsendfile2()
[all …]
H A Dmod_magnet.c521 http_response_send_file(r, &sce->name, sce); in magnet_stat_field()
617 lua_pushinteger(L, sce->st.st_ino); in magnet_stat_field()
647 lua_pushinteger(L, sce->st.st_gid); in magnet_stat_field()
659 lua_pushinteger(L, sce->st.st_uid); in magnet_stat_field()
716 if (NULL == sce) { in magnet_stat()
728 *udata = sce; in magnet_stat()
2232 if (sce && (sce->fd >= 0 || sce->st.st_size == 0)) { in magnet_respbody_add()
2235 if (off > sce->st.st_size) in magnet_respbody_add()
2236 off = sce->st.st_size; in magnet_respbody_add()
2580 if (sce && (sce->fd >= 0 || sce->st.st_size == 0)) { in magnet_attach_content()
[all …]
H A Dresponse.c216 stat_cache_entry *sce = stat_cache_get_entry(&r->physical.path); in http_response_physical_path_check() local
218 if (__builtin_expect( (sce != NULL), 1)) { in http_response_physical_path_check()
269 sce = nsce; in http_response_physical_path_check()
270 if (!S_ISDIR(sce->st.st_mode)) break; in http_response_physical_path_check()
273 if (NULL == pathinfo || !S_ISREG(sce->st.st_mode)) { in http_response_physical_path_check()
313 r->tmp_sce = sce; in http_response_physical_path_check()
315 if (S_ISREG(sce->st.st_mode)) /*(common case)*/ in http_response_physical_path_check()
318 if (S_ISDIR(sce->st.st_mode)) { in http_response_physical_path_check()
655 stat_cache_entry *sce = in http_response_static_errdoc() local
657 if (sce && 0 == http_chunk_append_file_ref(r, sce)) { in http_response_static_errdoc()
[all …]
H A Dhttp_chunk.h17 int http_chunk_append_file_ref(request_st *r, struct stat_cache_entry *sce); /* copies "fn" */
19 void http_chunk_append_file_ref_range(request_st *r, struct stat_cache_entry *sce, off_t offset, of…
H A Dmod_dirlisting.c595 stat_cache_entry * const sce = in http_list_directory_include_file() local
599 if (NULL == sce || sce->fd < 0 || 0 == sce->st.st_size) in http_list_directory_include_file()
616 buffer * const out = sce->st.st_size <= 32768 in http_list_directory_include_file()
620 const int fd = sce->fd; in http_list_directory_include_file()
639 (void)http_chunk_append_file_ref(r, sce); in http_list_directory_include_file()
1474 stat_cache_entry * const sce = stat_cache_get_entry_open(tb, 1); in mod_dirlisting_cache_check() local
1475 if (NULL == sce || sce->fd == -1) in mod_dirlisting_cache_check()
1478 TIME64_CAST(sce->st.st_mtime) + p->conf.cache->max_age - log_epoch_secs; in mod_dirlisting_cache_check()
1493 http_response_send_file(r, sce->name, sce); in mod_dirlisting_cache_check()
1504 if (0 != http_chunk_append_file_ref(r, sce)) { in mod_dirlisting_cache_check()
[all …]
H A Dresponse.h55 void http_response_send_file (request_st *r, const buffer *path, struct stat_cache_entry *sce);
H A Dmod_deflate.c2046 stat_cache_entry *sce = stat_cache_get_entry_open(tb, 1); in REQUEST_FUNC() local
2047 if (NULL != sce) { in REQUEST_FUNC()
2049 if (sce->fd < 0 || 0 != http_chunk_append_file_ref(r, sce)) in REQUEST_FUNC()
2054 mod_deflate_note_ratio(r, sce->st.st_size, len); in REQUEST_FUNC()
2059 sce = stat_cache_get_entry(r->write_queue.first->mem); in REQUEST_FUNC()
2060 if (NULL == sce || sce->st.st_size != len) in REQUEST_FUNC()