Lines Matching refs:p

18 static u_char *nxt_http_lookup_field_end(u_char *p, const u_char *end);
67 u_char *p; in nxt_http_parse_target() local
70 p = *pos; in nxt_http_parse_target()
72 while (nxt_fast_path(end - p >= 10)) { in nxt_http_parse_target()
85 nxt_target_test_char(p[0]); in nxt_http_parse_target()
86 nxt_target_test_char(p[1]); in nxt_http_parse_target()
87 nxt_target_test_char(p[2]); in nxt_http_parse_target()
88 nxt_target_test_char(p[3]); in nxt_http_parse_target()
90 nxt_target_test_char(p[4]); in nxt_http_parse_target()
91 nxt_target_test_char(p[5]); in nxt_http_parse_target()
92 nxt_target_test_char(p[6]); in nxt_http_parse_target()
93 nxt_target_test_char(p[7]); in nxt_http_parse_target()
95 nxt_target_test_char(p[8]); in nxt_http_parse_target()
96 nxt_target_test_char(p[9]); in nxt_http_parse_target()
98 p += 10; in nxt_http_parse_target()
101 while (p != end) { in nxt_http_parse_target()
102 nxt_target_test_char(*p); p++; in nxt_http_parse_target()
163 u_char *p, ch, *after_slash, *args; in nxt_http_parse_request_line() local
172 p = *pos; in nxt_http_parse_request_line()
174 rp->method.start = p; in nxt_http_parse_request_line()
178 while (nxt_fast_path(end - p >= 8)) { in nxt_http_parse_request_line()
183 p = &(ch); \ in nxt_http_parse_request_line()
189 nxt_method_test_char(p[0]); in nxt_http_parse_request_line()
190 nxt_method_test_char(p[1]); in nxt_http_parse_request_line()
191 nxt_method_test_char(p[2]); in nxt_http_parse_request_line()
192 nxt_method_test_char(p[3]); in nxt_http_parse_request_line()
194 nxt_method_test_char(p[4]); in nxt_http_parse_request_line()
195 nxt_method_test_char(p[5]); in nxt_http_parse_request_line()
196 nxt_method_test_char(p[6]); in nxt_http_parse_request_line()
197 nxt_method_test_char(p[7]); in nxt_http_parse_request_line()
199 p += 8; in nxt_http_parse_request_line()
202 while (p != end) { in nxt_http_parse_request_line()
203 nxt_method_test_char(*p); p++; in nxt_http_parse_request_line()
206 rp->method.length = p - rp->method.start; in nxt_http_parse_request_line()
212 ch = *p; in nxt_http_parse_request_line()
215 rp->method.length = p - rp->method.start; in nxt_http_parse_request_line()
220 p++; in nxt_http_parse_request_line()
224 if (rp->method.start == p && (ch == '\r' || ch == '\n')) { in nxt_http_parse_request_line()
226 p++; in nxt_http_parse_request_line()
230 rp->method.length = p - rp->method.start; in nxt_http_parse_request_line()
235 p++; in nxt_http_parse_request_line()
237 if (nxt_slow_path(p == end)) { in nxt_http_parse_request_line()
243 ch = *p; in nxt_http_parse_request_line()
246 rc = nxt_http_parse_unusual_target(rp, &p, end); in nxt_http_parse_request_line()
253 rp->target_start = p; in nxt_http_parse_request_line()
255 after_slash = p + 1; in nxt_http_parse_request_line()
262 p++; in nxt_http_parse_request_line()
264 trap = nxt_http_parse_target(&p, end); in nxt_http_parse_request_line()
268 if (nxt_slow_path(after_slash == p)) { in nxt_http_parse_request_line()
273 after_slash = p + 1; in nxt_http_parse_request_line()
277 if (nxt_slow_path(after_slash == p)) { in nxt_http_parse_request_line()
285 args = p + 1; in nxt_http_parse_request_line()
289 rp->target_end = p; in nxt_http_parse_request_line()
303 rp->target_end = p; in nxt_http_parse_request_line()
307 rp->target_end = p; in nxt_http_parse_request_line()
319 p++; in nxt_http_parse_request_line()
321 trap = nxt_http_parse_target(&p, end); in nxt_http_parse_request_line()
325 rp->target_end = p; in nxt_http_parse_request_line()
333 rp->target_end = p; in nxt_http_parse_request_line()
337 rp->target_end = p; in nxt_http_parse_request_line()
349 if (nxt_slow_path(end - p < 10)) { in nxt_http_parse_request_line()
352 p++; in nxt_http_parse_request_line()
354 if (p == end) { in nxt_http_parse_request_line()
358 } while (*p == ' '); in nxt_http_parse_request_line()
360 if (memcmp(p, "HTTP/", nxt_min(end - p, 5)) == 0) { in nxt_http_parse_request_line()
362 switch (end - p) { in nxt_http_parse_request_line()
364 if (p[7] < '0' || p[7] > '9') { in nxt_http_parse_request_line()
369 if (p[6] != '.') { in nxt_http_parse_request_line()
374 if (p[5] < '0' || p[5] > '9') { in nxt_http_parse_request_line()
394 if (nxt_slow_path(p[9] != '\r' && p[9] != '\n')) { in nxt_http_parse_request_line()
396 if (p[1] == ' ') { in nxt_http_parse_request_line()
398 p++; in nxt_http_parse_request_line()
411 nxt_memcpy(ver.str, &p[1], 8); in nxt_http_parse_request_line()
420 if (nxt_fast_path(p[9] == '\r')) { in nxt_http_parse_request_line()
421 p += 10; in nxt_http_parse_request_line()
423 if (nxt_slow_path(p == end)) { in nxt_http_parse_request_line()
427 if (nxt_slow_path(*p != '\n')) { in nxt_http_parse_request_line()
431 *pos = p + 1; in nxt_http_parse_request_line()
434 *pos = p + 10; in nxt_http_parse_request_line()
484 u_char *p, ch; in nxt_http_parse_unusual_target() local
486 p = *pos; in nxt_http_parse_unusual_target()
488 ch = *p; in nxt_http_parse_unusual_target()
494 p++; in nxt_http_parse_unusual_target()
496 if (nxt_slow_path(p == end)) { in nxt_http_parse_unusual_target()
500 ch = *p; in nxt_http_parse_unusual_target()
505 *pos = p; in nxt_http_parse_unusual_target()
522 u_char *p, c; in nxt_http_parse_field_name() local
541 p = *pos + rp->field_name.length; in nxt_http_parse_field_name()
544 while (nxt_fast_path(end - p >= 8)) { in nxt_http_parse_field_name()
552 p = &(ch); \ in nxt_http_parse_field_name()
564 nxt_field_name_test_char(p[0]); in nxt_http_parse_field_name()
565 nxt_field_name_test_char(p[1]); in nxt_http_parse_field_name()
566 nxt_field_name_test_char(p[2]); in nxt_http_parse_field_name()
567 nxt_field_name_test_char(p[3]); in nxt_http_parse_field_name()
569 nxt_field_name_test_char(p[4]); in nxt_http_parse_field_name()
570 nxt_field_name_test_char(p[5]); in nxt_http_parse_field_name()
571 nxt_field_name_test_char(p[6]); in nxt_http_parse_field_name()
572 nxt_field_name_test_char(p[7]); in nxt_http_parse_field_name()
574 p += 8; in nxt_http_parse_field_name()
577 while (nxt_fast_path(p != end)) { in nxt_http_parse_field_name()
578 nxt_field_name_test_char(*p); p++; in nxt_http_parse_field_name()
581 len = p - *pos; in nxt_http_parse_field_name()
596 if (nxt_fast_path(*p == ':')) { in nxt_http_parse_field_name()
597 if (nxt_slow_path(p == *pos)) { in nxt_http_parse_field_name()
601 len = p - *pos; in nxt_http_parse_field_name()
612 *pos = p + 1; in nxt_http_parse_field_name()
617 if (nxt_slow_path(p != *pos)) { in nxt_http_parse_field_name()
629 u_char *p, *start, ch; in nxt_http_parse_field_value() local
632 p = *pos; in nxt_http_parse_field_value()
635 if (nxt_slow_path(p == end)) { in nxt_http_parse_field_value()
636 *pos = p; in nxt_http_parse_field_value()
641 ch = *p; in nxt_http_parse_field_value()
647 p++; in nxt_http_parse_field_value()
650 start = p; in nxt_http_parse_field_value()
652 p += rp->field_value.length; in nxt_http_parse_field_value()
655 p = nxt_http_lookup_field_end(p, end); in nxt_http_parse_field_value()
657 if (nxt_slow_path(p == end)) { in nxt_http_parse_field_value()
660 len = p - start; in nxt_http_parse_field_value()
671 ch = *p; in nxt_http_parse_field_value()
681 p++; in nxt_http_parse_field_value()
684 *pos = p; in nxt_http_parse_field_value()
686 if (nxt_fast_path(p != start)) { in nxt_http_parse_field_value()
688 while (p[-1] == ' ' || p[-1] == '\t') { in nxt_http_parse_field_value()
689 p--; in nxt_http_parse_field_value()
693 len = p - start; in nxt_http_parse_field_value()
707 nxt_http_lookup_field_end(u_char *p, const u_char *end) in nxt_http_lookup_field_end() argument
709 while (nxt_fast_path(end - p >= 16)) { in nxt_http_lookup_field_end()
719 nxt_field_end_test_char(p[0]); in nxt_http_lookup_field_end()
720 nxt_field_end_test_char(p[1]); in nxt_http_lookup_field_end()
721 nxt_field_end_test_char(p[2]); in nxt_http_lookup_field_end()
722 nxt_field_end_test_char(p[3]); in nxt_http_lookup_field_end()
724 nxt_field_end_test_char(p[4]); in nxt_http_lookup_field_end()
725 nxt_field_end_test_char(p[5]); in nxt_http_lookup_field_end()
726 nxt_field_end_test_char(p[6]); in nxt_http_lookup_field_end()
727 nxt_field_end_test_char(p[7]); in nxt_http_lookup_field_end()
729 nxt_field_end_test_char(p[8]); in nxt_http_lookup_field_end()
730 nxt_field_end_test_char(p[9]); in nxt_http_lookup_field_end()
731 nxt_field_end_test_char(p[10]); in nxt_http_lookup_field_end()
732 nxt_field_end_test_char(p[11]); in nxt_http_lookup_field_end()
734 nxt_field_end_test_char(p[12]); in nxt_http_lookup_field_end()
735 nxt_field_end_test_char(p[13]); in nxt_http_lookup_field_end()
736 nxt_field_end_test_char(p[14]); in nxt_http_lookup_field_end()
737 nxt_field_end_test_char(p[15]); in nxt_http_lookup_field_end()
739 p += 16; in nxt_http_lookup_field_end()
742 while (nxt_fast_path(end - p >= 4)) { in nxt_http_lookup_field_end()
744 nxt_field_end_test_char(p[0]); in nxt_http_lookup_field_end()
745 nxt_field_end_test_char(p[1]); in nxt_http_lookup_field_end()
746 nxt_field_end_test_char(p[2]); in nxt_http_lookup_field_end()
747 nxt_field_end_test_char(p[3]); in nxt_http_lookup_field_end()
749 p += 4; in nxt_http_lookup_field_end()
752 switch (end - p) { in nxt_http_lookup_field_end()
754 nxt_field_end_test_char(*p); p++; in nxt_http_lookup_field_end()
757 nxt_field_end_test_char(*p); p++; in nxt_http_lookup_field_end()
760 nxt_field_end_test_char(*p); p++; in nxt_http_lookup_field_end()
768 return p; in nxt_http_lookup_field_end()
776 u_char *p; in nxt_http_parse_field_end() local
779 p = *pos; in nxt_http_parse_field_end()
781 if (nxt_fast_path(*p == '\r')) { in nxt_http_parse_field_end()
782 p++; in nxt_http_parse_field_end()
784 if (nxt_slow_path(p == end)) { in nxt_http_parse_field_end()
790 if (nxt_fast_path(*p == '\n')) { in nxt_http_parse_field_end()
791 *pos = p + 1; in nxt_http_parse_field_end()
858 u_char *p, *u, c, ch, high, *args; in nxt_http_parse_complex_target() local
873 p = rp->target_start; in nxt_http_parse_complex_target()
875 u = nxt_mp_alloc(rp->mem_pool, rp->target_end - p + 1); in nxt_http_parse_complex_target()
886 while (p < rp->target_end) { in nxt_http_parse_complex_target()
888 ch = *p++; in nxt_http_parse_complex_target()
911 args = p; in nxt_http_parse_complex_target()
942 args = p; in nxt_http_parse_complex_target()
977 args = p; in nxt_http_parse_complex_target()
1019 args = p; in nxt_http_parse_complex_target()
1105 *u++ = p[-1]; /* 'f' or 'F' */ in nxt_http_parse_complex_target()
1129 for (/* void */; p < rp->target_end; p++) { in nxt_http_parse_complex_target()
1130 if (*p == '#') { in nxt_http_parse_complex_target()
1136 rp->args.length = p - args; in nxt_http_parse_complex_target()