Lines Matching refs:ptr
107 const char *h = host->ptr; in request_check_hostname()
121 memmove(host->ptr+hlen, colon, len - hlen); in request_check_hostname()
158 if (*h != ']' || h - host->ptr == 1) return -1; in request_check_hostname()
165 buffer_truncate(host, h - host->ptr); in request_check_hostname()
200 const char * const p = b->ptr; in http_request_host_normalize()
230 if (n < sizeof(laddr.s)) memcpy(laddr.s, b->ptr, (laddr.n = n)); in http_request_host_normalize()
239 char *bracket = b->ptr+blen-1; in http_request_host_normalize()
240 char *percent = strchr(b->ptr+1, '%'); in http_request_host_normalize()
246 bracket = (char *)memchr(b->ptr+1, ']', blen-1); in http_request_host_normalize()
247 if (NULL == bracket || bracket[1] != ':' || bracket - b->ptr == 1){ in http_request_host_normalize()
261 len = (size_t)((percent ? percent : bracket) - (b->ptr+1)); in http_request_host_normalize()
262 if (laddr.n == len && 0 == memcmp(laddr.s, b->ptr+1, len)) { in http_request_host_normalize()
264 buffer_truncate(b, (size_t)(bracket - b->ptr + 1)); in http_request_host_normalize()
270 rc = sock_addr_inet_pton(&addr, b->ptr+1, AF_INET6, 0); in http_request_host_normalize()
502 …rse_proto_loose(request_st * const restrict r, const char * const restrict ptr, const size_t len, … in http_request_parse_proto_loose() argument
503 const char * proto = memchr(ptr, ' ', len); in http_request_parse_proto_loose()
506 proto = memchr(proto+1, ' ', len - (proto+1 - ptr)); in http_request_parse_proto_loose()
591 const char * const uri = r->target.ptr; in http_request_validate_pseudohdrs()
623 : http_request_check_uri_strict((const uint8_t *)r->target.ptr, len) in http_request_validate_pseudohdrs()
624 : http_request_check_line_minimal(r->target.ptr, len); in http_request_validate_pseudohdrs()
860 …t_parse_reqline(request_st * const restrict r, const char * const restrict ptr, const unsigned sho… in http_request_parse_reqline() argument
868 if (ptr[len-2] == '\r') in http_request_parse_reqline()
888 const char *p = ptr + len - 8; in http_request_parse_reqline()
901 int status = http_request_parse_proto_loose(r,ptr,len,http_parseopts); in http_request_parse_reqline()
904 for (p = ptr + len - 9; p[-1] != ' '; --p) ; in http_request_parse_reqline()
909 while (ptr[i] != ' ') ++i; in http_request_parse_reqline()
911 while (i < len && ptr[i] != ' ') ++i; in http_request_parse_reqline()
912 if (ptr[i] != ' ') in http_request_parse_reqline()
916 r->http_method = get_http_method_key(ptr, i); in http_request_parse_reqline()
920 const char *uri = ptr + i + 1; in http_request_parse_reqline()
940 : memchr(ptr, '\0', hoff[hoff[0]]);/* check entire headers set for '\0' */ in http_request_parse_reqline()
985 && target->ptr[0] == '*' in http_request_parse_target()
986 && target->ptr[1] == '\0')) { in http_request_parse_target()
1000 qstr = (-1 == qs) ? NULL : target->ptr+qs; in http_request_parse_target()
1022 qstr = memchr(target->ptr, '#', rlen);/* discard fragment */ in http_request_parse_target()
1024 rlen = (size_t)(qstr - target->ptr); in http_request_parse_target()
1027 qstr = memchr(target->ptr, '?', rlen); in http_request_parse_target()
1031 const char * const pstr = target->ptr; in http_request_parse_target()
1052 if (r->uri.path.ptr[0] != '/') in http_request_parse_target()
1102 static int http_request_parse_headers(request_st * const restrict r, char * const restrict ptr, con… in http_request_parse_headers() argument
1108 if (ptr[i] == ' ' || ptr[i] == '\t') { in http_request_parse_headers()
1114 const char *k = ptr + hoff[i]; in http_request_parse_headers()
1116 char *end = ptr + hoff[i+1]; in http_request_parse_headers()
1166 end = ptr + hoff[i+1]; in http_request_parse_headers()
1370 r->http_host ? r->http_host->ptr : "", in http_request_headers_process_h2()
1371 http_method_buf(r->http_method)->ptr, in http_request_headers_process_h2()
1372 !buffer_is_blank(&r->target) ? r->target.ptr : ""); in http_request_headers_process_h2()