Lines Matching refs:response

99 	buffer *response;  member
126 hctx->response = buffer_init(); in handler_ctx_init()
138 buffer_free(hctx->response); in handler_ctx_free()
623 con->response.content_length = strtol(value, NULL, 10); in proxy_response_parse()
632 if (NULL == (ds = (data_string *)array_get_unused_element(con->response.headers, TYPE_STRING))) { in proxy_response_parse()
638 array_insert_unique(con->response.headers, (data_unset *)ds); in proxy_response_parse()
670 if (hctx->response->used == 0) { in proxy_demux_response()
672 buffer_prepare_append(hctx->response, b + 1); in proxy_demux_response()
673 hctx->response->used = 1; in proxy_demux_response()
675 buffer_prepare_append(hctx->response, b); in proxy_demux_response()
678 if (-1 == (r = read(hctx->fd, hctx->response->ptr + hctx->response->used - 1, b))) { in proxy_demux_response()
689 hctx->response->used += r; in proxy_demux_response()
690 hctx->response->ptr[hctx->response->used - 1] = '\0'; in proxy_demux_response()
694 "demux: Response buffer len", hctx->response->used, ":", hctx->response, ":"); in proxy_demux_response()
706 if (NULL != (c = buffer_search_string_len(hctx->response, "\r\n\r\n", 4))) { in proxy_demux_response()
707 size_t hlen = c - hctx->response->ptr + 4; in proxy_demux_response()
708 size_t blen = hctx->response->used - hlen - 1; in proxy_demux_response()
711 … buffer_append_string_len(hctx->response_header, hctx->response->ptr, c - hctx->response->ptr + 4); in proxy_demux_response()
721 con->response.transfer_encoding = HTTP_TRANSFER_ENCODING_CHUNKED; in proxy_demux_response()
728 hctx->response->used = 0; in proxy_demux_response()
732 http_chunk_append_mem(srv, con, hctx->response->ptr, hctx->response->used); in proxy_demux_response()
734 hctx->response->used = 0; in proxy_demux_response()