Lines Matching refs:c
282 const chunk *c = cq->first; in connection_write_chunkqueue() local
283 do { c = c->next; } while (c && c->type == MEM_CHUNK); in connection_write_chunkqueue()
290 if (NULL != c || (con->is_ssl_sock && chunkqueue_length(cq) > 16384)) { in connection_write_chunkqueue()
573 static chunk * connection_read_header_more(connection *con, chunkqueue *cq, chunk *c, const size_t … in connection_read_header_more() argument
579 if ((NULL == c || NULL == c->next) && con->is_readable > 0) { in connection_read_header_more()
598 c = cq->first; in connection_read_header_more()
599 return (c && (size_t)c->offset + olen < buffer_clen(c->mem)) in connection_read_header_more()
600 ? c in connection_read_header_more()
642 chunk *c = cq->first; in connection_handle_read_state() local
655 if (NULL != c) { /* !chunkqueue_is_empty(cq)) */ in connection_handle_read_state()
668 if (NULL == c) continue; in connection_handle_read_state()
669 clen = buffer_clen(c->mem) - c->offset; in connection_handle_read_state()
671 if (__builtin_expect( (c->offset > USHRT_MAX), 0)) /*(highly unlikely)*/ in connection_handle_read_state()
675 hoff[1] = (unsigned short)c->offset; /* base offset for all lines */ in connection_handle_read_state()
678 header_len = http_header_parse_hoff(c->mem->ptr + c->offset,clen,hoff); in connection_handle_read_state()
699 const int ch = c->mem->ptr[c->offset+header_len]; in connection_handle_read_state()
704 c = connection_discard_blank_line(cq, header_len);/*cold*/ in connection_handle_read_state()
710 if (((unsigned char *)c->mem->ptr)[c->offset] < 32) { in connection_handle_read_state()
715 c->mem->ptr[c->offset] == 0x16 in connection_handle_read_state()
723 } while ((c = connection_read_header_more(con, cq, c, clen))); in connection_handle_read_state()
733 if (pipelined_request_start && c) in connection_handle_read_state()
737 if (NULL == c) return 0; /* incomplete request headers */ in connection_handle_read_state()
740 if (buffer_clen(c->mem) < hoff[1]) { in connection_handle_read_state()
745 char * const hdrs = c->mem->ptr + hoff[1]; in connection_handle_read_state()
1593 chunk *c = cq->first; in connection_handle_read_post_cq_compact() local
1594 if (NULL == c) return 0; in connection_handle_read_post_cq_compact()
1595 const uint32_t mlen = buffer_clen(c->mem) - (size_t)c->offset; in connection_handle_read_post_cq_compact()
1596 while ((c = c->next)) { in connection_handle_read_post_cq_compact()
1597 const uint32_t blen = buffer_clen(c->mem) - (size_t)c->offset; in connection_handle_read_post_cq_compact()
1612 chunk *c; in connection_handle_read_post_chunked_crlf() local
1621 c = cq->first; in connection_handle_read_post_chunked_crlf()
1622 b = c->mem; in connection_handle_read_post_chunked_crlf()
1623 p = b->ptr+c->offset; in connection_handle_read_post_chunked_crlf()
1626 len = buffer_clen(b) - (size_t)c->offset; in connection_handle_read_post_chunked_crlf()
1629 while (NULL != (c = c->next)) { in connection_handle_read_post_chunked_crlf()
1630 b = c->mem; in connection_handle_read_post_chunked_crlf()
1631 len = buffer_clen(b) - (size_t)c->offset; in connection_handle_read_post_chunked_crlf()
1633 p = b->ptr+c->offset; in connection_handle_read_post_chunked_crlf()
1651 chunk *c = cq->first; in connection_handle_read_post_chunked() local
1652 if (NULL == c) break; in connection_handle_read_post_chunked()
1653 force_assert(c->type == MEM_CHUNK); in connection_handle_read_post_chunked()
1654 p = strchr(c->mem->ptr+c->offset, '\n'); in connection_handle_read_post_chunked()
1656 off_t hsz = p + 1 - (c->mem->ptr+c->offset); in connection_handle_read_post_chunked()
1657 unsigned char *s = (unsigned char *)c->mem->ptr+c->offset; in connection_handle_read_post_chunked()
1668 if (s == (unsigned char *)c->mem->ptr+c->offset) { /*(no hex)*/ in connection_handle_read_post_chunked()
1703 c = cq->first; in connection_handle_read_post_chunked()
1704 p = strstr(c->mem->ptr+c->offset+hsz, "\r\n\r\n"); in connection_handle_read_post_chunked()
1711 if ((off_t)buffer_clen(c->mem) - c->offset in connection_handle_read_post_chunked()
1719 p = c->mem->ptr + buffer_clen(c->mem) in connection_handle_read_post_chunked()
1723 hsz = p + 4 - (c->mem->ptr+c->offset); in connection_handle_read_post_chunked()
1757 if ((off_t)buffer_clen(c->mem) - c->offset >= 1024) { in connection_handle_read_post_chunked()