Lines Matching refs:frags
93 memset(ah->frags, 0, sizeof(ah->frags)); in _lws_header_table_reset()
471 return wsi->http.ah->frags[n].len; in lws_hdr_fragment_length()
472 n = wsi->http.ah->frags[n].nfrag; in lws_hdr_fragment_length()
490 len += wsi->http.ah->frags[n].len; in lws_hdr_total_length()
491 n = wsi->http.ah->frags[n].nfrag; in lws_hdr_total_length()
516 f = wsi->http.ah->frags[f].nfrag; in lws_hdr_copy_fragment()
522 if (wsi->http.ah->frags[f].len >= len) in lws_hdr_copy_fragment()
525 memcpy(dst, wsi->http.ah->data + wsi->http.ah->frags[f].offset, in lws_hdr_copy_fragment()
526 wsi->http.ah->frags[f].len); in lws_hdr_copy_fragment()
527 dst[wsi->http.ah->frags[f].len] = '\0'; in lws_hdr_copy_fragment()
529 return wsi->http.ah->frags[f].len; in lws_hdr_copy_fragment()
551 comma = (wsi->http.ah->frags[n].nfrag) ? 1 : 0; in lws_hdr_copy()
555 __func__, (int)wsi->http.ah->frags[n].len, in lws_hdr_copy()
557 wsi->http.ah->frags[n].offset]); in lws_hdr_copy()
559 if (wsi->http.ah->frags[n].len + comma >= len) { in lws_hdr_copy()
563 strncpy(dst, &wsi->http.ah->data[wsi->http.ah->frags[n].offset], in lws_hdr_copy()
564 wsi->http.ah->frags[n].len); in lws_hdr_copy()
565 dst += wsi->http.ah->frags[n].len; in lws_hdr_copy()
566 len -= wsi->http.ah->frags[n].len; in lws_hdr_copy()
567 n = wsi->http.ah->frags[n].nfrag; in lws_hdr_copy()
692 return wsi->http.ah->data + wsi->http.ah->frags[n].offset; in lws_hdr_simple_ptr()
736 if (wsi->http.ah->nfrag == LWS_ARRAY_SIZE(wsi->http.ah->frags)) { in lws_hdr_simple_create()
743 wsi->http.ah->frags[wsi->http.ah->nfrag].offset = wsi->http.ah->pos; in lws_hdr_simple_create()
744 wsi->http.ah->frags[wsi->http.ah->nfrag].len = 0; in lws_hdr_simple_create()
745 wsi->http.ah->frags[wsi->http.ah->nfrag].nfrag = 0; in lws_hdr_simple_create()
753 wsi->http.ah->frags[wsi->http.ah->nfrag].len++; in lws_hdr_simple_create()
767 frag_len = wsi->http.ah->frags[wsi->http.ah->nfrag].len; in issue_char()
775 wsi->http.ah->frags[wsi->http.ah->nfrag].len++; in issue_char()
866 wsi->http.ah->frags[wsi->http.ah->nfrag].len--; in lws_parse_urldecode()
868 ah->frags[ah->nfrag].nfrag = (uint8_t)(ah->nfrag + 1); in lws_parse_urldecode()
870 if (ah->nfrag >= LWS_ARRAY_SIZE(ah->frags)) in lws_parse_urldecode()
874 ah->frags[ah->nfrag].offset = ++ah->pos; in lws_parse_urldecode()
875 ah->frags[ah->nfrag].len = 0; in lws_parse_urldecode()
876 ah->frags[ah->nfrag].nfrag = 0; in lws_parse_urldecode()
937 if (ah->frags[ah->nfrag].len > 2) { in lws_parse_urldecode()
939 ah->frags[ah->nfrag].len--; in lws_parse_urldecode()
942 ah->frags[ah->nfrag].len--; in lws_parse_urldecode()
943 } while (ah->frags[ah->nfrag].len > 1 && in lws_parse_urldecode()
947 if (ah->frags[ah->nfrag].len > 1) in lws_parse_urldecode()
972 wsi->http.ah->frags[wsi->http.ah->nfrag].len--; in lws_parse_urldecode()
976 if (ah->nfrag >= LWS_ARRAY_SIZE(ah->frags)) in lws_parse_urldecode()
978 ah->frags[ah->nfrag].offset = ++ah->pos; in lws_parse_urldecode()
979 ah->frags[ah->nfrag].len = 0; in lws_parse_urldecode()
980 ah->frags[ah->nfrag].nfrag = 0; in lws_parse_urldecode()
1065 if (!ah->frags[ah->frag_index[ah->parser_state]].len && in lws_parse()
1080 if (!ah->frags[ah->nfrag].len) in lws_parse()
1091 if (ah->frags[ah->nfrag].len > 2) { in lws_parse()
1093 ah->frags[ah->nfrag].len--; in lws_parse()
1096 ah->frags[ah->nfrag].len--; in lws_parse()
1097 } while (ah->frags[ah->nfrag].len > 1 && in lws_parse()
1106 wsi->http.ah->frags[wsi->http.ah->nfrag].len--; in lws_parse()
1157 wsi->http.ah->frags[wsi->http.ah->nfrag].len--; in lws_parse()
1446 if (ah->nfrag == LWS_ARRAY_SIZE(ah->frags)) { in lws_parse()
1451 ah->frags[ah->nfrag].offset = ah->pos; in lws_parse()
1452 ah->frags[ah->nfrag].len = 0; in lws_parse()
1453 ah->frags[ah->nfrag].nfrag = 0; in lws_parse()
1454 ah->frags[ah->nfrag].flags = 2; in lws_parse()
1463 while (ah->frags[n].nfrag) in lws_parse()
1464 n = ah->frags[n].nfrag; in lws_parse()
1465 ah->frags[n].nfrag = ah->nfrag; in lws_parse()
1563 p = wsi->http.ah->data + wsi->http.ah->frags[f].offset; in lws_http_cookie_get()
1564 fl = (size_t)wsi->http.ah->frags[f].len; in lws_http_cookie_get()
1578 f = wsi->http.ah->frags[f].nfrag; in lws_http_cookie_get()