Lines Matching refs:hctx

180 static handler_t scgi_create_env(handler_ctx *hctx) {  in scgi_create_env()  argument
181 gw_host *host = hctx->host; in scgi_create_env()
182 request_st * const r = hctx->r; in scgi_create_env()
184 http_cgi_header_append_cb scgi_env_add = hctx->conf.proto == LI_PROTOCOL_SCGI in scgi_create_env()
188 size_t rsz = (size_t)(r->read_queue.bytes_out - hctx->wb.bytes_in); in scgi_create_env()
190 buffer * const b = chunkqueue_prepend_buffer_open_sz(&hctx->wb, rsz); in scgi_create_env()
200 chunkqueue_remove_finished_chunks(&hctx->wb); in scgi_create_env()
204 if (hctx->conf.proto == LI_PROTOCOL_SCGI) { in scgi_create_env()
222 chunkqueue_remove_finished_chunks(&hctx->wb); in scgi_create_env()
232 hctx->wb_reqlen = buffer_clen(b) - offset; in scgi_create_env()
233 chunkqueue_prepend_buffer_commit(&hctx->wb); 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()
236 hctx->wb.bytes_out -= (off_t)offset; in scgi_create_env()
239 chunkqueue_append_chunkqueue(&hctx->wb, &r->reqbody_queue); in scgi_create_env()
241 hctx->wb_reqlen += r->reqbody_length; /* total req size */ in scgi_create_env()
243 hctx->wb_reqlen = -hctx->wb_reqlen; in scgi_create_env()
264 handler_ctx *hctx = r->plugin_ctx[p->id]; in scgi_check_extension() local
265 hctx->opts.backend = BACKEND_SCGI; in scgi_check_extension()
266 hctx->create_env = scgi_create_env; in scgi_check_extension()
267 hctx->response = chunk_buffer_acquire(); in scgi_check_extension()