Home
last modified time | relevance | path

Searched refs:hctx (Results 1 – 8 of 8) sorted by relevance

/mOS-networking-stack/samples/lighttpd-1.4.32/src/
H A Dmod_proxy.c121 hctx = calloc(1, sizeof(*hctx)); in handler_ctx_init()
131 hctx->fd = -1; in handler_ctx_init()
134 return hctx; in handler_ctx_init()
142 free(hctx); in handler_ctx_free()
345 fdevent_event_del(srv->ev, &(hctx->fde_ndx), hctx->fd); in proxy_connection_close()
678 if (-1 == (r = read(hctx->fd, hctx->response->ptr + hctx->response->used - 1, b))) { in proxy_demux_response()
690 hctx->response->ptr[hctx->response->used - 1] = '\0'; in proxy_demux_response()
711 … buffer_append_string_len(hctx->response_header, hctx->response->ptr, c - hctx->response->ptr + 4); in proxy_demux_response()
842 if (hctx->wb->bytes_out == hctx->wb->bytes_in) { in proxy_write_request()
845 fdevent_event_del(srv->ev, &(hctx->fde_ndx), hctx->fd); in proxy_write_request()
[all …]
H A Dmod_fastcgi.c448 if (hctx->host->disable_time || hctx->proc->is_local) { in fcgi_host_disable()
489 hctx = calloc(1, sizeof(*hctx)); in handler_ctx_init()
490 assert(hctx); in handler_ctx_init()
500 hctx->fd = -1; in handler_ctx_init()
508 return hctx; in handler_ctx_init()
521 free(hctx); in handler_ctx_free()
1484 if (hctx->host && hctx->proc) { in fcgi_connection_close()
1543 hctx->proc->pid, hctx->proc->connection_name); in fcgi_reconnect()
1551 if (hctx->proc && hctx->got_proc) { in fcgi_reconnect()
2960 hctx->pid = hctx->proc->pid; in fcgi_write_request()
[all …]
H A Dmod_scgi.c353 hctx = calloc(1, sizeof(*hctx)); in handler_ctx_init()
384 if (hctx->rb->ptr) free(hctx->rb->ptr); in handler_ctx_free()
388 free(hctx); in handler_ctx_free()
1211 if (hctx->host && hctx->proc) { in scgi_connection_cleanup()
1222 hctx->proc->pid, hctx->proc->socket); in scgi_connection_cleanup()
1270 hctx->proc->pid, hctx->proc->socket); in scgi_reconnect()
1799 if (-1 == (n = read(hctx->fd, hctx->response->ptr, hctx->response->size - 1))) { in scgi_demux_response()
2218 for (hctx->proc = hctx->host->first; in scgi_write_request()
2220 hctx->proc = hctx->proc->next); in scgi_write_request()
2230 hctx->pid = hctx->proc->pid; in scgi_write_request()
[all …]
H A Dmod_cgi.c86 handler_ctx *hctx = calloc(1, sizeof(*hctx)); in cgi_handler_ctx_init() local
88 assert(hctx); in cgi_handler_ctx_init()
93 return hctx; in cgi_handler_ctx_init()
100 free(hctx); in cgi_handler_ctx_free()
357 if (-1 == (n = read(hctx->fd, hctx->response->ptr, hctx->response->size - 1))) { in cgi_demux_response()
539 fdevent_event_del(srv->ev, &(hctx->fde_ndx), hctx->fd); in cgi_connection_close()
546 hctx->fd = -1; in cgi_connection_close()
550 pid = hctx->pid; in cgi_connection_close()
1182 fdevent_event_del(srv->ev, &(hctx->fde_ndx), hctx->fd); in cgi_create_env()
1384 fdevent_event_del(srv->ev, &(hctx->fde_ndx), hctx->fd); in SUBREQUEST_FUNC()
[all …]
H A Dmod_setenv.c34 handler_ctx * hctx; in handler_ctx_init() local
36 hctx = calloc(1, sizeof(*hctx)); in handler_ctx_init()
38 hctx->handled = 0; in handler_ctx_init()
40 return hctx; in handler_ctx_init()
44 free(hctx); in handler_ctx_free()
162 handler_ctx *hctx; in URIHANDLER_FUNC() local
165 hctx = con->plugin_ctx[p->id]; in URIHANDLER_FUNC()
167 hctx = handler_ctx_init(); in URIHANDLER_FUNC()
169 con->plugin_ctx[p->id] = hctx; in URIHANDLER_FUNC()
172 if (hctx->handled) { in URIHANDLER_FUNC()
[all …]
H A Dmod_rewrite.c49 handler_ctx * hctx; in handler_ctx_init() local
51 hctx = calloc(1, sizeof(*hctx)); in handler_ctx_init()
53 hctx->state = REWRITE_STATE_UNSET; in handler_ctx_init()
54 hctx->loops = 0; in handler_ctx_init()
56 return hctx; in handler_ctx_init()
60 free(hctx); in handler_ctx_free()
348 handler_ctx *hctx; in process_rewrite_rules() local
351 hctx = con->plugin_ctx[p->id]; in process_rewrite_rules()
353 if (hctx->loops++ > 100) { in process_rewrite_rules()
433 hctx = handler_ctx_init(); in process_rewrite_rules()
[all …]
H A Dmod_extforward.c105 handler_ctx * hctx; in handler_ctx_init() local
106 hctx = calloc(1, sizeof(*hctx)); in handler_ctx_init()
107 hctx->saved_remote_addr = oldaddr; in handler_ctx_init()
108 hctx->saved_remote_addr_buf = oldaddr_buf; in handler_ctx_init()
109 return hctx; in handler_ctx_init()
112 static void handler_ctx_free(handler_ctx *hctx) { in handler_ctx_free() argument
113 free(hctx); in handler_ctx_free()
479 handler_ctx *hctx = con->plugin_ctx[p->id]; in CONNECTION_FUNC() local
481 if (!hctx) return HANDLER_GO_ON; in CONNECTION_FUNC()
483 con->dst_addr = hctx->saved_remote_addr; in CONNECTION_FUNC()
[all …]
H A Dmod_skeleton.c45 handler_ctx * hctx; in handler_ctx_init() local
47 hctx = calloc(1, sizeof(*hctx)); in handler_ctx_init()
49 return hctx; in handler_ctx_init()
52 static void handler_ctx_free(handler_ctx *hctx) { in handler_ctx_free() argument
54 free(hctx); in handler_ctx_free()