Lines Matching refs:http
43 if (h->u.http.boundary_seq != h->u.http.boundary_len) {
44 if (q[n] == h->u.http.boundary[h->u.http.boundary_seq])
45 h->u.http.boundary_seq++;
47 h->u.http.boundary_seq = 0;
48 h->u.http.boundary_dashes = 0;
49 h->u.http.boundary_post = 0;
58 if (h->u.http.boundary_dashes < 2) {
60 h->u.http.boundary_dashes++;
66 if (h->u.http.boundary_dashes == 2) {
77 if (n >= pending_issue + h->u.http.boundary_len +
78 (h->u.http.any ? 2 : 0) + 1) {
82 h->u.http.boundary_len - 1 -
83 (h->u.http.any ? 2 : 0) /* crlf */),
84 (!h->u.http.som ? LWSSS_FLAG_SOM : 0) |
86 h->u.http.eom = 1;
98 if (h->u.http.boundary_post < 2) {
99 if ((!h->u.http.boundary_post && q[n] == '\x0d') ||
100 (h->u.http.boundary_post && q[n] == '\x0a')) {
101 h->u.http.boundary_post++;
108 if (h->u.http.boundary_post != 2)
116 h->u.http.boundary_seq = 0;
117 h->u.http.boundary_post = 0;
119 if (n >= pending_issue && (h->u.http.any || !h->u.http.som)) {
128 if (n >= pending_issue + h->u.http.boundary_len +
129 (h->u.http.any ? 2 : 0)) {
132 h->u.http.boundary_len -
133 (h->u.http.any ? 2 /* crlf */ : 0)),
134 (!h->u.http.som ? LWSSS_FLAG_SOM : 0) |
136 h->u.http.eom = 1;
143 if (h->u.http.eom) {
145 h->u.http.som = 0;
146 h->u.http.eom = 0;
164 if ((n >= h->u.http.boundary_len) &&
165 h->u.http.boundary_seq == h->u.http.boundary_len &&
166 h->u.http.boundary_post == 2) {
173 (n - pending_issue - h->u.http.boundary_len -
174 (h->u.http.any ? 2 : 0)) :
176 (!h->u.http.som ? LWSSS_FLAG_SOM : 0) |
177 (oh && h->u.http.any ? LWSSS_FLAG_EOM : 0));
179 if (oh && h->u.http.any)
180 h->u.http.eom = 1;
182 h->u.http.any = 1;
183 h->u.http.som = 1;
197 const lws_ss_http_respmap_t *r = h->policy->u.http.respmap;
198 int n = h->policy->u.http.count_respmap;
210 * This converts any set metadata items into outgoing http headers
254 if (h->policy->u.http.method && (
255 (!strcmp(h->policy->u.http.method, "POST") ||
256 !strcmp(h->policy->u.http.method, "PATCH") ||
257 !strcmp(h->policy->u.http.method, "PUT"))) &&
258 wsi->http.writeable_len) {
262 (unsigned int)wsi->http.writeable_len);
499 if (h->policy->u.http.fail_redirect)
517 wsi->conmon.protocol_specific.http.response =
570 wsi->conmon.protocol_specific.http.response =
609 if (h->policy->u.http.resp_expect)
610 h->u.http.good_respcode =
611 status == h->policy->u.http.resp_expect;
613 h->u.http.good_respcode = (status >= 200 && status < 300);
614 // lwsl_err("%s: good resp %d %d\n", __func__, status, h->u.http.good_respcode);
639 if (h->u.http.good_respcode)
643 if (h->u.http.good_respcode)
664 * Since it's an http transaction we initiated... this is
698 h->u.http.boundary[0] = '\0';
707 h->u.http.boundary[0] = '\x0d';
708 h->u.http.boundary[1] = '\x0a';
709 h->u.http.boundary[2] = '-';
710 h->u.http.boundary[3] = '-';
711 lws_strnncpy(h->u.http.boundary + 4,
713 sizeof(h->u.http.boundary) - 4);
714 h->u.http.boundary_len =
716 h->u.http.boundary_seq = 2;
717 h->u.http.boundary_dashes = 0;
721 h->u.http.boundary, h->u.http.boundary_len);
726 h->u.http.boundary[0])
744 wsi->http.writeable_len = h->writeable_len;
758 if (!h->policy->u.http.blob_header[m])
770 h->policy->u.http.auth_preamble)
772 h->policy->u.http.auth_preamble);
790 (uint8_t *)h->policy->u.http.blob_header[m],
833 !strcmp(h->policy->u.http.method, "PUT") ||
834 !strcmp(h->policy->u.http.method, "PATCH") ||
835 !strcmp(h->policy->u.http.method, "POST"))) {
857 h->u.http.boundary[0])
878 /* uninterpreted http content */
904 wsi->http.writeable_len = h->writeable_len = 0;
911 h->u.http.good_respcode ?
915 r = lws_ss_event_helper(h, h->u.http.good_respcode ?
936 * to take care of the http response header for it first
944 NULL, h->wsi->http.writeable_len,
978 !h->inside_msg && h->rideshare->u.http.multipart_name)
980 h->rideshare->u.http.multipart_name,
981 h->rideshare->u.http.multipart_filename,
982 h->rideshare->u.http.multipart_content_type,
986 if (h->policy->u.http.multipart_name)
1011 if (h->rideshare->u.http.multipart_name)
1154 * pieces at connection setup time, eg, http url pieces.
1165 const char *pbasis = h->policy->u.http.url;
1178 // i->alpn = "http/1.1";
1213 "http/1.1",