Lines Matching refs:http
65 if (wsi->http.did_stream_close)
68 wsi->http.did_stream_close = 1;
319 &wsi->http.buflist_post_body, in, len) < 0)
337 if (!n && wsi->http.cgi && wsi->http.cgi->lsp &&
338 wsi->http.cgi->lsp->stdwsi[LWS_STDOUT])
340 wsi->http.cgi->lsp->stdwsi[LWS_STDOUT], 1);
348 if (wsi->http.cgi && wsi->http.cgi->cgi_transaction_over) {
356 if ((wsi->http.cgi && wsi->http.cgi->cgi_transaction_over) ||
382 if (!wsi->http.prh_content_length)
386 (int)wsi->http.prh_content_length);
387 n = lws_write(wsi, wsi->http.pending_return_headers +
389 wsi->http.pending_return_headers_len,
392 lws_free_set_NULL(wsi->http.pending_return_headers);
459 if (wsi->http.proxy_parent_chunked) {
468 * this only needs dealing with on http/1.1 to allow
488 /* h1 http proxying... */
559 wsi->http.proxy_parent_chunked = 1;
565 parent->http.prh_content_length = (size_t)-1;
567 parent->http.prh_content_length = (size_t)atoll(
571 parent->http.pending_return_headers_len = lws_ptr_diff_size_t(p, start);
572 parent->http.pending_return_headers =
573 lws_malloc(parent->http.pending_return_headers_len +
575 if (!parent->http.pending_return_headers)
578 memcpy(parent->http.pending_return_headers + LWS_PRE, start,
579 parent->http.pending_return_headers_len);
586 (int)parent->http.prh_content_length);
656 * - subprocess stdout goes on http via writeable callback
689 if (wsi->http.cgi) {
691 wsi->http.cgi->explicitly_chunked,
692 (uint64_t)wsi->http.cgi->content_length);
693 if (!(wsi->http.cgi->explicitly_chunked && wsi->mux_substream) &&
694 !wsi->http.cgi->content_length) {
722 if (wsi->http.cgi->gzip_inflate) {
725 if (!wsi->http.cgi->gzip_init) {
728 memset(&wsi->http.cgi->inflate, 0,
729 sizeof(wsi->http.cgi->inflate));
731 if (inflateInit2(&wsi->http.cgi->inflate,
737 wsi->http.cgi->gzip_init = 1;
740 wsi->http.cgi->inflate.next_in = args->data;
741 wsi->http.cgi->inflate.avail_in = (unsigned int)args->len;
745 wsi->http.cgi->inflate.next_out =
746 wsi->http.cgi->inflate_buf;
747 wsi->http.cgi->inflate.avail_out =
748 sizeof(wsi->http.cgi->inflate_buf);
750 n = inflate(&wsi->http.cgi->inflate,
758 inflateEnd(&wsi->http.cgi->inflate);
759 wsi->http.cgi->gzip_init = 0;
764 if (wsi->http.cgi->inflate.avail_out !=
765 sizeof(wsi->http.cgi->inflate_buf)) {
769 wsi->http.cgi->inflate_buf,
770 sizeof(wsi->http.cgi->inflate_buf) -
771 wsi->http.cgi->inflate.avail_out);
774 sizeof(wsi->http.cgi->inflate_buf) -
775 wsi->http.cgi->inflate.avail_out)) {
785 inflateEnd(&wsi->http.cgi->inflate);
786 wsi->http.cgi->gzip_init = 0;
793 if (wsi->http.cgi->inflate.avail_out)
810 if (wsi->http.cgi->post_in_expected && args->stdwsi[LWS_STDIN] &&
812 wsi->http.cgi->post_in_expected -= (unsigned int)n;
814 if (!wsi->http.cgi->post_in_expected) {
837 wsi->http.cgi->lsp->stdwsi[LWS_STDIN] = NULL;
838 lws_spawn_stdwsi_closed(wsi->http.cgi->lsp, siwsi);