/third_party/libwebsockets/lib/roles/cgi/ |
H A D | cgi-server.c | 81 if (!cgi->wsi->http.cgi->post_in_expected) in lws_cgi_grace() 82 cgi->wsi->http.cgi->cgi_transaction_over = 1; in lws_cgi_grace() 98 if (wsi->http.cgi) in lws_cgi_reap_cb() 100 (int)wsi->http.cgi->post_in_expected); in lws_cgi_reap_cb() 106 if (wsi->http.cgi) in lws_cgi_reap_cb() 107 lws_sul_schedule(wsi->a.context, wsi->tsi, &wsi->http.cgi->sul_grace, in lws_cgi_reap_cb() 127 wsi->http.cgi = lws_zalloc(sizeof(*wsi->http.cgi), "new cgi"); in lws_cgi() 128 if (!wsi->http.cgi) { in lws_cgi() 133 wsi->http in lws_cgi() [all...] |
H A D | ops-cgi.c | 55 if (!wsi->parent->http.cgi) { in rops_handle_POLLIN_cgi() 61 if (!wsi->parent->http.cgi->lsp) { in rops_handle_POLLIN_cgi() 68 args.stdwsi = &wsi->parent->http.cgi->lsp->stdwsi[0]; in rops_handle_POLLIN_cgi() 93 if (!wsi->http.cgi) in rops_destroy_role_cgi() 95 if (!wsi->http.cgi->gzip_init) in rops_destroy_role_cgi() 98 inflateEnd(&wsi->http.cgi->inflate); in rops_destroy_role_cgi() 99 wsi->http.cgi->gzip_init = 0; in rops_destroy_role_cgi() 113 if (pt->http.cgi_list) in lws_cgi_sul_cb() 132 if (wsi->parent && wsi->parent->http.cgi && wsi->parent->http in rops_close_role_cgi() [all...] |
/third_party/libwebsockets/lib/roles/http/ |
H A D | parsers.c | 56 ah->next = pt->http.ah_list; in _lws_create_ah() 57 pt->http.ah_list = ah; in _lws_create_ah() 59 pt->http.ah_pool_length++; in _lws_create_ah() 62 ah, (int)data_size, (unsigned int)pt->http.ah_pool_length); in _lws_create_ah() 70 lws_start_foreach_llp(struct allocated_headers **, a, pt->http.ah_list) { in _lws_destroy_ah() 73 pt->http.ah_pool_length--; in _lws_destroy_ah() 76 (unsigned int)pt->http.ah_pool_length); in _lws_destroy_ah() 111 struct allocated_headers *ah = wsi->http.ah; in __lws_header_table_reset() 165 struct lws **pwsi = &pt->http.ah_wait_list; in _lws_header_ensure_we_are_on_waiting_list() 170 pwsi = &(*pwsi)->http in _lws_header_ensure_we_are_on_waiting_list() [all...] |
H A D | header.c | 39 * Return http header index if one matches slen chars of s, or -1 170 wsi->http.tx_content_length = content_length; in lws_add_http_header_content_length() 171 wsi->http.tx_content_remain = content_length; in lws_add_http_header_content_length() 200 if (!wsi->http.lcs && content_type && in lws_add_http_common_headers() 213 !wsi->http.lcs && in lws_add_http_common_headers() 223 if (!wsi->mux_substream && wsi->http.lcs) { in lws_add_http_common_headers() 226 * - http compression transform active in lws_add_http_common_headers() 231 wsi->http.comp_ctx.chunking = 1; in lws_add_http_common_headers() 240 if (wsi->http.lcs && in lws_add_http_common_headers() 241 wsi->http in lws_add_http_common_headers() [all...] |
/third_party/libwebsockets/lib/secure-streams/protocols/ |
H A D | ss-h1.c | 43 if (h->u.http.boundary_seq != h->u.http.boundary_len) { in ss_http_multipart_parser() 44 if (q[n] == h->u.http.boundary[h->u.http.boundary_seq]) in ss_http_multipart_parser() 45 h->u.http.boundary_seq++; in ss_http_multipart_parser() 47 h->u.http.boundary_seq = 0; in ss_http_multipart_parser() 48 h->u.http.boundary_dashes = 0; in ss_http_multipart_parser() 49 h->u.http.boundary_post = 0; in ss_http_multipart_parser() 58 if (h->u.http.boundary_dashes < 2) { in ss_http_multipart_parser() 60 h->u.http in ss_http_multipart_parser() [all...] |
/third_party/node/deps/ngtcp2/nghttp3/lib/ |
H A D | nghttp3_http.c | 81 static int check_pseudo_header(nghttp3_http_state *http, in check_pseudo_header() argument 83 if ((http->flags & flag) || nv->value->len == 0) { in check_pseudo_header() 86 http->flags |= flag; in check_pseudo_header() 90 static int expect_response_body(nghttp3_http_state *http) { in expect_response_body() argument 91 return (http->flags & NGHTTP3_HTTP_FLAG_METH_HEAD) == 0 && in expect_response_body() 92 http->status_code / 100 != 1 && http->status_code != 304 && in expect_response_body() 93 http->status_code != 204; in expect_response_body() 96 /* For "http" or "https" URIs, OPTIONS request may have "*" in :path 101 static int check_path_flags(nghttp3_http_state *http) { in check_path_flags() argument 824 http_request_on_header(nghttp3_http_state *http, nghttp3_qpack_nv *nv, int trailers, int connect_protocol) http_request_on_header() argument 955 http_response_on_header(nghttp3_http_state *http, nghttp3_qpack_nv *nv, int trailers) http_response_on_header() argument 1299 nghttp3_http_on_header(nghttp3_http_state *http, nghttp3_qpack_nv *nv, int request, int trailers, int connect_protocol) nghttp3_http_on_header() argument 1378 nghttp3_http_on_request_headers(nghttp3_http_state *http) nghttp3_http_on_request_headers() argument 1406 nghttp3_http_on_response_headers(nghttp3_http_state *http) nghttp3_http_on_response_headers() argument [all...] |
/third_party/libwebsockets/lib/roles/http/server/ |
H A D | access-log.c | 66 wsi->http.access_log.header_log = lws_malloc((unsigned int)l, "access log"); in lws_prepare_access_log_info() 67 if (!wsi->http.access_log.header_log) in lws_prepare_access_log_info() 104 lws_snprintf(wsi->http.access_log.header_log, (size_t)l, in lws_prepare_access_log_info() 106 ta, da, me, uri, hver[wsi->http.request_version]); in lws_prepare_access_log_info() 108 //lwsl_notice("%s\n", wsi->http.access_log.header_log); in lws_prepare_access_log_info() 112 wsi->http.access_log.user_agent = in lws_prepare_access_log_info() 114 if (!wsi->http.access_log.user_agent) { in lws_prepare_access_log_info() 116 lws_free_set_NULL(wsi->http.access_log.header_log); in lws_prepare_access_log_info() 119 wsi->http.access_log.user_agent[0] = '\0'; in lws_prepare_access_log_info() 121 if (lws_hdr_copy(wsi, wsi->http in lws_prepare_access_log_info() [all...] |
H A D | server.c | 685 if (wsi->a.vhost->http.error_document_404 && in lws_http_serve() 686 !strcmp(uri, wsi->a.vhost->http.error_document_404)) in lws_http_serve() 700 if (wsi->http.fop_fd) in lws_http_serve() 701 lws_vfs_file_close(&wsi->http.fop_fd); in lws_http_serve() 703 wsi->http.fop_fd = fops->LWS_FOP_OPEN(wsi->a.context->fops, in lws_http_serve() 705 if (!wsi->http.fop_fd) { in lws_http_serve() 719 if (fstat(wsi->http.fop_fd->fd, &st)) { in lws_http_serve() 741 wsi->http.fop_fd->mod_time = (uint32_t)st.st_mtime; in lws_http_serve() 768 (unsigned long long)lws_vfs_get_length(wsi->http.fop_fd), in lws_http_serve() 769 (unsigned long)lws_vfs_get_mod_time(wsi->http in lws_http_serve() [all...] |
/third_party/nghttp2/integration-tests/ |
H A D | nghttpx_http2_test.go | 10 "net/http" 33 if got, want := res.status, http.StatusOK; got != want { 43 handler: func(w http.ResponseWriter, r *http.Request) { 45 if got, want := xfp, "foo, http"; got != want { 62 if got, want := res.status, http.StatusOK; got != want { 75 handler: func(w http.ResponseWriter, r *http.Request) { 94 if got, want := res.status, http.StatusOK; got != want { 103 handler: func(w http [all...] |
H A D | nghttpx_http1_test.go | 9 "net/http" 31 if got, want := res.status, http.StatusOK; got != want { 52 if got, want := res.status, http.StatusOK; got != want { 61 handler: func(w http.ResponseWriter, r *http.Request) { 76 if got, want := res.status, http.StatusNotImplemented; got != want { 85 handler: func(w http.ResponseWriter, r *http.Request) { 97 resp, err := http.ReadResponse(bufio.NewReader(st.conn), nil) 99 t.Fatalf("Error http [all...] |
/third_party/libwebsockets/lib/core-net/ |
H A D | dummy-callback.c | 65 if (wsi->http.did_stream_close) in stream_close() 68 wsi->http.did_stream_close = 1; in stream_close() 319 &wsi->http.buflist_post_body, in, len) < 0) in lws_callback_http_dummy() 337 if (!n && wsi->http.cgi && wsi->http.cgi->lsp && in lws_callback_http_dummy() 338 wsi->http.cgi->lsp->stdwsi[LWS_STDOUT]) in lws_callback_http_dummy() 340 wsi->http.cgi->lsp->stdwsi[LWS_STDOUT], 1); in lws_callback_http_dummy() 348 if (wsi->http.cgi && wsi->http.cgi->cgi_transaction_over) { in lws_callback_http_dummy() 356 if ((wsi->http in lws_callback_http_dummy() [all...] |
/third_party/libwebsockets/lib/roles/http/compression/ |
H A D | stream.c | 44 wsi->http.comp_accept_mask = 0; in lws_http_compression_validate() 46 if (!wsi->http.ah || !lwsi_role_server(wsi)) in lws_http_compression_validate() 55 wsi->http.comp_accept_mask = (uint8_t)(wsi->http.comp_accept_mask | (1 << n)); in lws_http_compression_validate() 74 if (!decomp && !(wsi->http.comp_accept_mask & (1 << n))) in lws_http_compression_apply() 84 lcs_available[n]->init_compression(&wsi->http.comp_ctx, decomp); in lws_http_compression_apply() 85 if (!wsi->http.comp_ctx.u.generic_ctx_ptr) { in lws_http_compression_apply() 90 wsi->http.lcs = lcs_available[n]; in lws_http_compression_apply() 91 wsi->http.comp_ctx.may_have_more = 0; in lws_http_compression_apply() 92 wsi->http in lws_http_compression_apply() [all...] |
/third_party/libwebsockets/lib/roles/h1/ |
H A D | ops-h1.c | 68 if (!wsi->http.ah) { in lws_read_h1() 113 wsi->http.rx_content_remain = in lws_read_h1() 114 wsi->http.rx_content_length; in lws_read_h1() 115 if (wsi->http.rx_content_remain) in lws_read_h1() 128 lwsl_info("%s: http post body: cl set %d, remain %d, len %d\n", __func__, in lws_read_h1() 129 (int)wsi->http.content_length_given, in lws_read_h1() 130 (int)wsi->http.rx_content_remain, (int)len); in lws_read_h1() 132 if (wsi->http.content_length_given && !wsi->http.rx_content_remain) in lws_read_h1() 135 while (len && (!wsi->http in lws_read_h1() [all...] |
/third_party/node/test/parallel/ |
H A D | test-http-set-timeout-server.js | 26 const http = require('http'); 45 const server = http.createServer(); 52 assert.ok(s instanceof http.Server); 53 http.get({ 60 const server = http.createServer(common.mustCall((req, res) => { 67 assert.ok(s instanceof http.IncomingMessage); 70 const req = http.request({ 81 const server = http.createServer(common.mustCall((req, res) => { 88 assert.ok(s instanceof http [all...] |
H A D | test-http-agent-scheduling.js | 5 const http = require('http'); 8 return http.createServer(common.mustCallAtLeast((req, res) => { 15 http 51 const url = `http://localhost:${server.address().port}`; 52 const agent = new http.Agent({ 78 const url = `http://localhost:${server.address().port}`; 79 const agent = new http.Agent({ 106 const url = `http://localhost:${server.address().port}`; 107 const agent = new http [all...] |
H A D | test-http-client-agent.js | 25 const http = require('http'); 31 const server = http.Server(common.mustCall((req, res) => { 43 name = http.globalAgent.getName({ port: server.address().port }); 49 assert(!(name in http.globalAgent.sockets)); 50 assert(!(name in http.globalAgent.requests)); 55 const req = http.get({ 63 assert.strictEqual(http.globalAgent.sockets[name].includes(socket),
|
H A D | test-http-generic-streams.js | 4 const http = require('http'); 10 const server = http.createServer(common.mustCall((req, res) => { 19 const req = http.request({ 34 const server = http.createServer(common.mustCall((req, res) => { 44 const req = http.request({ 66 const server = http.createServer(common.mustCall((req, res) => { 85 const req = http.request({ 104 const server = http.createServer(common.mustCall((req, res) => { 125 const req = http [all...] |
/third_party/nghttp2/src/ |
H A D | shrpx_http_test.cc | 46 http::create_forwarded(balloc, in test_shrpx_http_create_forwarded() 55 http::create_forwarded( in test_shrpx_http_create_forwarded() 61 http::create_forwarded( in test_shrpx_http_create_forwarded() 67 http::create_forwarded( in test_shrpx_http_create_forwarded() 73 http::create_forwarded( in test_shrpx_http_create_forwarded() 83 auto end = http::create_via_header_value(std::begin(buf), 1, 1); in test_shrpx_http_create_via_header_value() 89 end = http::create_via_header_value(std::begin(buf), 2, 0); in test_shrpx_http_create_via_header_value() 98 c = http::create_affinity_cookie(balloc, StringRef::from_lit("cookie-val"), in test_shrpx_http_create_affinity_cookie() 103 c = http::create_affinity_cookie(balloc, StringRef::from_lit("alpha"), in test_shrpx_http_create_affinity_cookie() 108 c = http in test_shrpx_http_create_affinity_cookie() [all...] |
/third_party/libwebsockets/lib/roles/http/client/ |
H A D | client-http.c | 228 * with http/2 prior knowledge. in lws_http_client_socket_service() 305 if (wsi->http.proxy_clientside && wsi->parent && in lws_http_client_socket_service() 306 wsi->parent->http.buflist_post_body) in lws_http_client_socket_service() 320 wsi->http.ah->parser_state = WSI_TOKEN_NAME_PART; in lws_http_client_socket_service() 321 wsi->http.ah->lextable_pos = 0; in lws_http_client_socket_service() 322 wsi->http.ah->unk_pos = 0; in lws_http_client_socket_service() 324 wsi->http.ah->ues = URIES_IDLE; in lws_http_client_socket_service() 337 if (wsi->http.proxy_clientside && wsi->parent && in lws_http_client_socket_service() 338 wsi->parent->http.buflist_post_body) in lws_http_client_socket_service() 351 wsi->http in lws_http_client_socket_service() [all...] |
/third_party/libwebsockets/lib/core-net/client/ |
H A D | client.c | 39 /* we have to deal with a possible redundant leading http:// */ in lws_set_proxy() 40 if (!strncmp(proxy, "http://", 7)) in lws_set_proxy() 80 lws_strncpy(vhost->http.http_proxy_address, proxy + brackets, in lws_set_proxy() 81 sizeof(vhost->http.http_proxy_address)); in lws_set_proxy() 83 p = vhost->http.http_proxy_address; in lws_set_proxy() 89 p = strchr(vhost->http.http_proxy_address, ']'); in lws_set_proxy() 100 if (!p && !vhost->http.http_proxy_port) { in lws_set_proxy() 107 vhost->http.http_proxy_port = (unsigned int)atoi(p + 1); in lws_set_proxy() 110 lwsl_vhost_info(vhost, " Proxy %s:%u", vhost->http.http_proxy_address, in lws_set_proxy() 111 vhost->http in lws_set_proxy() [all...] |
/third_party/skia/infra/wasm-common/gold/ |
H A D | wasm_gold_aggregator.go | 22 "net/http" 90 http.HandleFunc("/report_gold_data", reporter) 91 http.HandleFunc("/dump_json", dumpJSON) 95 log.Fatal(http.ListenAndServe(":"+*port, nil)) 101 func reporter(w http.ResponseWriter, r *http.Request) { 103 http.Error(w, "Only POST accepted", 400) 110 http.Error(w, "Malformed body", 400) 117 http.Error(w, "Could not unmarshal JSON", 400) 124 http [all...] |
/third_party/skia/infra/lottiecap/gold/ |
H A D | lottie-web-aggregator.go | 24 "net/http" 82 http.HandleFunc("/report_gold_data", reporter) 83 http.HandleFunc("/dump_json", dumpJSON) 87 log.Fatal(http.ListenAndServe(":"+*port, nil)) 93 func reporter(w http.ResponseWriter, r *http.Request) { 95 http.Error(w, "Only POST accepted", 400) 102 http.Error(w, "Malformed body", 400) 109 http.Error(w, "Could not unmarshal JSON", 400) 116 http [all...] |
/third_party/libwebsockets/minimal-examples/secure-streams/minimal-secure-streams-policy2c/ |
H A D | minimal-secure-streams.c | 368 /* dump any streamtype's http resp map */ in main() 378 /* if relevant, dump http resp map */ in main() 385 if (!pol->u.http.count_respmap) in main() 395 for (n = 0; n < pol->u.http.count_respmap; n++) { in main() 397 pol->u.http.respmap[n].resp, in main() 398 pol->u.http.respmap[n].state); in main() 505 printf("\t.u = {\n\t\t.http = {\n"); in main() 507 if (pol->u.http.method) in main() 509 pol->u.http.method); in main() 510 if (pol->u.http in main() [all...] |
/third_party/skia/infra/wasm-common/perf/ |
H A D | wasm_perf_aggregator.go | 21 "net/http" 106 http.HandleFunc("/report_perf_data", reporter) 107 http.HandleFunc("/dump_json", dumpJSON) 111 log.Fatal(http.ListenAndServe(":"+*port, nil)) 115 func reporter(w http.ResponseWriter, r *http.Request) { 117 http.Error(w, "Only POST accepted", 400) 124 http.Error(w, "Malformed body", 400) 131 http.Error(w, "Could not unmarshal JSON", 400) 159 func dumpJSON(w http [all...] |
/third_party/curl/lib/ |
H A D | http.c | 75 #include "http.h" 167 struct HTTP *http; in Curl_http_setup_conn() local 168 DEBUGASSERT(data->req.p.http == NULL); in Curl_http_setup_conn() 170 http = calloc(1, sizeof(struct HTTP)); in Curl_http_setup_conn() 171 if(!http) in Curl_http_setup_conn() 174 data->req.p.http = http; in Curl_http_setup_conn() 189 * if proxy headers are not available, then it will lookup into http header 430 struct HTTP *http = data->req.p.http; in http_perhapsrewind() local 1189 struct HTTP *http = (struct HTTP *)userp; readmoredata() local 1240 Curl_buffer_send(struct dynbuf *in, struct Curl_easy *data, struct HTTP *http, curl_off_t *bytes_written, curl_off_t included_body_bytes, int sockindex) Curl_buffer_send() argument 1539 struct HTTP *http = data->req.p.http; Curl_http_done() local 2343 struct HTTP *http = data->req.p.http; Curl_http_body() local 2443 struct HTTP *http = data->req.p.http; addexpect() local 2471 struct HTTP *http = data->req.p.http; Curl_http_bodysend() local 3086 struct HTTP *http; Curl_http() local [all...] |