• Home
  • Raw
  • Download

Lines Matching refs:StringRef

134     {StringRef::from_lit("alpha"), StringRef::from_lit("0"), true},
135 {StringRef::from_lit("bravo"), StringRef::from_lit("1")},
136 {StringRef::from_lit("connection"), StringRef::from_lit("2"), false,
138 {StringRef::from_lit("connection"), StringRef::from_lit("3"), false,
140 {StringRef::from_lit("delta"), StringRef::from_lit("4")},
141 {StringRef::from_lit("expect"), StringRef::from_lit("5")},
142 {StringRef::from_lit("foxtrot"), StringRef::from_lit("6")},
143 {StringRef::from_lit("tango"), StringRef::from_lit("7")},
144 {StringRef::from_lit("te"), StringRef::from_lit("8"), false, http2::HD_TE},
145 {StringRef::from_lit("te"), StringRef::from_lit("9"), false, http2::HD_TE},
146 {StringRef::from_lit("x-forwarded-proto"), StringRef::from_lit("10"), false,
148 {StringRef::from_lit("x-forwarded-proto"), StringRef::from_lit("11"), false,
150 {StringRef::from_lit("zulu"), StringRef::from_lit("12")}};
155 {StringRef::from_lit("x-forwarded-for"), StringRef::from_lit("xff1"), false,
157 {StringRef::from_lit("x-forwarded-for"), StringRef::from_lit("xff2"), false,
159 {StringRef::from_lit("x-forwarded-proto"), StringRef::from_lit("xfp1"),
161 {StringRef::from_lit("x-forwarded-proto"), StringRef::from_lit("xfp2"),
163 {StringRef::from_lit("forwarded"), StringRef::from_lit("fwd1"), false,
165 {StringRef::from_lit("forwarded"), StringRef::from_lit("fwd2"), false,
167 {StringRef::from_lit("via"), StringRef::from_lit("via1"), false,
169 {StringRef::from_lit("via"), StringRef::from_lit("via2"), false,
268 balloc, StringRef{uri}, u, StringRef{match_host}, in check_rewrite_location_uri()
269 StringRef{req_authority}, StringRef{upstream_scheme}); in check_rewrite_location_uri()
302 CU_ASSERT(200 == http2::parse_http_status_code(StringRef::from_lit("200"))); in test_http2_parse_http_status_code()
303 CU_ASSERT(102 == http2::parse_http_status_code(StringRef::from_lit("102"))); in test_http2_parse_http_status_code()
304 CU_ASSERT(-1 == http2::parse_http_status_code(StringRef::from_lit("099"))); in test_http2_parse_http_status_code()
305 CU_ASSERT(-1 == http2::parse_http_status_code(StringRef::from_lit("99"))); in test_http2_parse_http_status_code()
306 CU_ASSERT(-1 == http2::parse_http_status_code(StringRef::from_lit("-1"))); in test_http2_parse_http_status_code()
307 CU_ASSERT(-1 == http2::parse_http_status_code(StringRef::from_lit("20a"))); in test_http2_parse_http_status_code()
308 CU_ASSERT(-1 == http2::parse_http_status_code(StringRef{})); in test_http2_parse_http_status_code()
323 http2::lookup_token(StringRef::from_lit(":authority"))); in test_http2_lookup_token()
324 CU_ASSERT(-1 == http2::lookup_token(StringRef::from_lit(":authorit"))); in test_http2_lookup_token()
325 CU_ASSERT(-1 == http2::lookup_token(StringRef::from_lit(":Authority"))); in test_http2_lookup_token()
327 http2::lookup_token(StringRef::from_lit("expect"))); in test_http2_lookup_token()
333 auto res = http2::parse_link_header(StringRef::from_lit("<url>")); in test_http2_parse_link_header()
339 http2::parse_link_header(StringRef::from_lit("<url>; rel=preload")); in test_http2_parse_link_header()
346 StringRef::from_lit("<url>; rel=preload; as=file")); in test_http2_parse_link_header()
353 StringRef::from_lit("<url>; as=file; rel=preload")); in test_http2_parse_link_header()
361 StringRef::from_lit(R"(<url>; rel=preload; title="foo,bar")")); in test_http2_parse_link_header()
369 StringRef::from_lit(R"(<url>; title="foo,bar"; rel=preload)")); in test_http2_parse_link_header()
376 StringRef::from_lit(R"(<url>; title="foo,bar", <url2>; rel=preload)")); in test_http2_parse_link_header()
383 StringRef::from_lit("<url>; rel=preload, <url2>")); in test_http2_parse_link_header()
390 StringRef::from_lit("<url>; rel=preload, <url2>; rel=preload")); in test_http2_parse_link_header()
398 StringRef::from_lit("<url>, <url2>;rel=preload")); in test_http2_parse_link_header()
405 http2::parse_link_header(StringRef::from_lit("<url>;rel=preload;")); in test_http2_parse_link_header()
411 StringRef::from_lit("<url>;rel=preload;, <url>")); in test_http2_parse_link_header()
417 http2::parse_link_header(StringRef::from_lit("<url>;rel=preload,")); in test_http2_parse_link_header()
424 StringRef::from_lit("<url>,,,<url2>;rel=preload")); in test_http2_parse_link_header()
431 http2::parse_link_header(StringRef::from_lit("url>;rel=preload")); in test_http2_parse_link_header()
437 http2::parse_link_header(StringRef::from_lit("<url;rel=preload")); in test_http2_parse_link_header()
443 http2::parse_link_header(StringRef::from_lit("<url>;rel=preload; as=")); in test_http2_parse_link_header()
449 http2::parse_link_header(StringRef::from_lit("<url>;as=;rel=preload")); in test_http2_parse_link_header()
455 StringRef::from_lit("<url>;as=, <url>;rel=preload")); in test_http2_parse_link_header()
461 StringRef::from_lit("<url>; =file; rel=preload")); in test_http2_parse_link_header()
467 StringRef::from_lit("<url>;as=file;rel=preload,<url2>;rel=preload")); in test_http2_parse_link_header()
475 http2::parse_link_header(StringRef::from_lit("<url>; as; rel=preload")); in test_http2_parse_link_header()
482 StringRef::from_lit("<url>; foo*=bar; rel=preload")); in test_http2_parse_link_header()
489 StringRef::from_lit("<url>; *=bar; rel=preload")); in test_http2_parse_link_header()
495 StringRef::from_lit("<url>; foo*bar=buzz; rel=preload")); in test_http2_parse_link_header()
501 StringRef::from_lit("<url>; foo*; rel=preload")); in test_http2_parse_link_header()
507 http2::parse_link_header(StringRef::from_lit("<url> rel=preload")); in test_http2_parse_link_header()
513 http2::parse_link_header(StringRef::from_lit(" <url>; rel=preload")); in test_http2_parse_link_header()
520 http2::parse_link_header(StringRef::from_lit("<url>; rel=preloadx")); in test_http2_parse_link_header()
526 StringRef::from_lit(R"(<url>; rel="preload")")); in test_http2_parse_link_header()
533 StringRef::from_lit(R"(<url>; rel="preload foo")")); in test_http2_parse_link_header()
540 StringRef::from_lit(R"(<url>; rel="foo preload")")); in test_http2_parse_link_header()
547 StringRef::from_lit(R"(<url>; rel="foo preload bar")")); in test_http2_parse_link_header()
554 StringRef::from_lit(R"(<url>; rel="foo preload bar")")); in test_http2_parse_link_header()
561 http2::parse_link_header(StringRef::from_lit(R"(<url>; rel="foo")")); in test_http2_parse_link_header()
567 StringRef::from_lit(R"(<url>; rel="foo bar")")); in test_http2_parse_link_header()
573 StringRef::from_lit(R"(<url>; rel="preload", <url2>)")); in test_http2_parse_link_header()
580 StringRef::from_lit(R"(<url>, <url2>; rel="preload")")); in test_http2_parse_link_header()
587 StringRef::from_lit(R"(<url>; rel="preload"; as="font")")); in test_http2_parse_link_header()
595 StringRef::from_lit(R"(<url>; rel="preload".)")); in test_http2_parse_link_header()
602 StringRef::from_lit(R"(<url>; rel="preload";)")); in test_http2_parse_link_header()
609 StringRef::from_lit(R"(<url>; rel="preload",)")); in test_http2_parse_link_header()
617 StringRef::from_lit(R"(<url>; rel=" preload")")); in test_http2_parse_link_header()
624 StringRef::from_lit(R"(<url>; rel="preload ")")); in test_http2_parse_link_header()
630 StringRef::from_lit(R"(<url>; rel=preload; title="foo\"baz\"bar")")); in test_http2_parse_link_header()
763 http2::path_join(base, StringRef{}, rel, StringRef{})); in test_http2_parse_link_header()
767 auto base = StringRef::from_lit("/alpha/bravo/"); in test_http2_parse_link_header()
768 auto rel = StringRef::from_lit("../charlie/delta"); in test_http2_parse_link_header()
770 http2::path_join(base, StringRef{}, rel, StringRef{})); in test_http2_parse_link_header()
774 auto base = StringRef::from_lit("/alpha/bravo"); in test_http2_parse_link_header()
775 auto rel = StringRef::from_lit("../charlie"); in test_http2_parse_link_header()
777 http2::path_join(base, StringRef{}, rel, StringRef{})); in test_http2_parse_link_header()
781 auto base = StringRef::from_lit("/alpha/bravo/"); in test_http2_parse_link_header()
782 auto rel = StringRef::from_lit("../charlie/../delta"); in test_http2_parse_link_header()
784 http2::path_join(base, StringRef{}, rel, StringRef{})); in test_http2_parse_link_header()
788 auto base = StringRef::from_lit("/alpha/bravo/"); in test_http2_parse_link_header()
789 auto rel = StringRef::from_lit("../../../"); in test_http2_parse_link_header()
790 CU_ASSERT("/" == http2::path_join(base, StringRef{}, rel, StringRef{})); in test_http2_parse_link_header()
794 auto base = StringRef::from_lit("/alpha/bravo/"); in test_http2_parse_link_header()
795 auto rel = StringRef::from_lit("../../../charlie"); in test_http2_parse_link_header()
797 http2::path_join(base, StringRef{}, rel, StringRef{})); in test_http2_parse_link_header()
801 auto base = StringRef::from_lit("/alpha/bravo/"); in test_http2_parse_link_header()
802 auto rel = StringRef::from_lit("charlie/.."); in test_http2_parse_link_header()
804 http2::path_join(base, StringRef{}, rel, StringRef{})); in test_http2_parse_link_header()
808 auto base = StringRef{}; in test_http2_parse_link_header()
809 auto rel = StringRef::from_lit("charlie/.."); in test_http2_parse_link_header()
810 CU_ASSERT("/" == http2::path_join(base, StringRef{}, rel, StringRef{})); in test_http2_parse_link_header()
814 auto base = StringRef::from_lit("/"); in test_http2_parse_link_header()
815 auto rel = StringRef::from_lit("charlie/././././delta"); in test_http2_parse_link_header()
817 http2::path_join(base, StringRef{}, rel, StringRef{})); in test_http2_parse_link_header()
821 auto base = StringRef::from_lit("/"); in test_http2_parse_link_header()
822 auto rel = StringRef::from_lit("charlie/."); in test_http2_parse_link_header()
824 http2::path_join(base, StringRef{}, rel, StringRef{})); in test_http2_parse_link_header()
828 auto base = StringRef::from_lit("/"); in test_http2_parse_link_header()
829 auto rel = StringRef::from_lit("/"); in test_http2_parse_link_header()
830 auto relq = StringRef::from_lit("q"); in test_http2_parse_link_header()
831 CU_ASSERT("/?q" == http2::path_join(base, StringRef{}, rel, relq)); in test_http2_parse_link_header()
835 auto base = StringRef::from_lit("/alpha"); in test_http2_parse_link_header()
836 auto rel = StringRef{}; in test_http2_parse_link_header()
837 auto relq = StringRef::from_lit("q"); in test_http2_parse_link_header()
838 CU_ASSERT("/alpha?q" == http2::path_join(base, StringRef{}, rel, relq)); in test_http2_parse_link_header()
842 auto base = StringRef::from_lit("/alpha"); in test_http2_parse_link_header()
843 auto baseq = StringRef::from_lit("r"); in test_http2_parse_link_header()
844 auto rel = StringRef{}; in test_http2_parse_link_header()
845 auto relq = StringRef{}; in test_http2_parse_link_header()
850 auto base = StringRef{}; in test_http2_parse_link_header()
851 auto rel = StringRef::from_lit("/alpha"); in test_http2_parse_link_header()
853 http2::path_join(base, StringRef{}, rel, StringRef{})); in test_http2_parse_link_header()
857 CU_ASSERT("/" == http2::path_join(StringRef{}, StringRef{}, StringRef{}, in test_http2_parse_link_header()
858 StringRef{})); in test_http2_parse_link_header()
862 auto base = StringRef{}; in test_http2_parse_link_header()
863 auto baseq = StringRef::from_lit("r"); in test_http2_parse_link_header()
864 auto rel = StringRef{}; in test_http2_parse_link_header()
865 CU_ASSERT("/?r" == http2::path_join(base, baseq, rel, StringRef{})); in test_http2_parse_link_header()
869 auto base = StringRef{}; in test_http2_parse_link_header()
870 auto baseq = StringRef{}; in test_http2_parse_link_header()
871 auto rel = StringRef::from_lit("//alpha//bravo"); in test_http2_parse_link_header()
872 auto relq = StringRef::from_lit("charlie"); in test_http2_parse_link_header()
877 constexpr auto base = StringRef::from_lit("/b/c/d;p"); in test_http2_parse_link_header()
878 constexpr auto baseq = StringRef::from_lit("q"); in test_http2_parse_link_header()
880 auto rel = StringRef::from_lit("g"); in test_http2_parse_link_header()
881 auto relq = StringRef{}; in test_http2_parse_link_header()
885 auto rel = StringRef::from_lit("./g"); in test_http2_parse_link_header()
886 auto relq = StringRef{}; in test_http2_parse_link_header()
890 auto rel = StringRef::from_lit("g/"); in test_http2_parse_link_header()
891 auto relq = StringRef{}; in test_http2_parse_link_header()
895 auto rel = StringRef::from_lit("/g"); in test_http2_parse_link_header()
896 auto relq = StringRef{}; in test_http2_parse_link_header()
900 auto rel = StringRef{}; in test_http2_parse_link_header()
901 auto relq = StringRef::from_lit("y"); in test_http2_parse_link_header()
905 auto rel = StringRef::from_lit("g"); in test_http2_parse_link_header()
906 auto relq = StringRef::from_lit("y"); in test_http2_parse_link_header()
910 auto rel = StringRef::from_lit(";x"); in test_http2_parse_link_header()
911 auto relq = StringRef{}; in test_http2_parse_link_header()
915 auto rel = StringRef::from_lit("g;x"); in test_http2_parse_link_header()
916 auto relq = StringRef{}; in test_http2_parse_link_header()
920 auto rel = StringRef::from_lit("g;x"); in test_http2_parse_link_header()
921 auto relq = StringRef::from_lit("y"); in test_http2_parse_link_header()
925 auto rel = StringRef{}; in test_http2_parse_link_header()
926 auto relq = StringRef{}; in test_http2_parse_link_header()
930 auto rel = StringRef::from_lit("."); in test_http2_parse_link_header()
931 auto relq = StringRef{}; in test_http2_parse_link_header()
935 auto rel = StringRef::from_lit("./"); in test_http2_parse_link_header()
936 auto relq = StringRef{}; in test_http2_parse_link_header()
940 auto rel = StringRef::from_lit(".."); in test_http2_parse_link_header()
941 auto relq = StringRef{}; in test_http2_parse_link_header()
945 auto rel = StringRef::from_lit("../"); in test_http2_parse_link_header()
946 auto relq = StringRef{}; in test_http2_parse_link_header()
950 auto rel = StringRef::from_lit("../g"); in test_http2_parse_link_header()
951 auto relq = StringRef{}; in test_http2_parse_link_header()
955 auto rel = StringRef::from_lit("../.."); in test_http2_parse_link_header()
956 auto relq = StringRef{}; in test_http2_parse_link_header()
960 auto rel = StringRef::from_lit("../../"); in test_http2_parse_link_header()
961 auto relq = StringRef{}; in test_http2_parse_link_header()
965 auto rel = StringRef::from_lit("../../g"); in test_http2_parse_link_header()
966 auto relq = StringRef{}; in test_http2_parse_link_header()
970 auto rel = StringRef::from_lit("../../../g"); in test_http2_parse_link_header()
971 auto relq = StringRef{}; in test_http2_parse_link_header()
975 auto rel = StringRef::from_lit("../../../../g"); in test_http2_parse_link_header()
976 auto relq = StringRef{}; in test_http2_parse_link_header()
980 auto rel = StringRef::from_lit("/./g"); in test_http2_parse_link_header()
981 auto relq = StringRef{}; in test_http2_parse_link_header()
985 auto rel = StringRef::from_lit("/../g"); in test_http2_parse_link_header()
986 auto relq = StringRef{}; in test_http2_parse_link_header()
990 auto rel = StringRef::from_lit("g."); in test_http2_parse_link_header()
991 auto relq = StringRef{}; in test_http2_parse_link_header()
995 auto rel = StringRef::from_lit(".g"); in test_http2_parse_link_header()
996 auto relq = StringRef{}; in test_http2_parse_link_header()
1000 auto rel = StringRef::from_lit("g.."); in test_http2_parse_link_header()
1001 auto relq = StringRef{}; in test_http2_parse_link_header()
1005 auto rel = StringRef::from_lit("..g"); in test_http2_parse_link_header()
1006 auto relq = StringRef{}; in test_http2_parse_link_header()
1010 auto rel = StringRef::from_lit("./../g"); in test_http2_parse_link_header()
1011 auto relq = StringRef{}; in test_http2_parse_link_header()
1015 auto rel = StringRef::from_lit("./g/."); in test_http2_parse_link_header()
1016 auto relq = StringRef{}; in test_http2_parse_link_header()
1020 auto rel = StringRef::from_lit("g/./h"); in test_http2_parse_link_header()
1021 auto relq = StringRef{}; in test_http2_parse_link_header()
1025 auto rel = StringRef::from_lit("g/../h"); in test_http2_parse_link_header()
1026 auto relq = StringRef{}; in test_http2_parse_link_header()
1030 auto rel = StringRef::from_lit("g;x=1/./y"); in test_http2_parse_link_header()
1031 auto relq = StringRef{}; in test_http2_parse_link_header()
1035 auto rel = StringRef::from_lit("g;x=1/../y"); in test_http2_parse_link_header()
1036 auto relq = StringRef{}; in test_http2_parse_link_header()
1044 StringRef::from_lit("/alpha/bravo/../charlie"), StringRef{})); in test_http2_normalize_path()
1047 http2::normalize_path(StringRef::from_lit("/a%6c%70%68%61"), in test_http2_normalize_path()
1048 StringRef{})); in test_http2_normalize_path()
1052 http2::normalize_path(StringRef::from_lit("/alpha%2f%3a"), StringRef{})); in test_http2_normalize_path()
1055 http2::normalize_path(StringRef::from_lit("%2f"), StringRef{})); in test_http2_normalize_path()
1058 http2::normalize_path(StringRef::from_lit("%f"), StringRef{})); in test_http2_normalize_path()
1061 http2::normalize_path(StringRef::from_lit("%"), StringRef{})); in test_http2_normalize_path()
1063 CU_ASSERT("/" == http2::normalize_path(StringRef{}, StringRef{})); in test_http2_normalize_path()
1066 http2::normalize_path(StringRef::from_lit("/alpha"), in test_http2_normalize_path()
1067 StringRef::from_lit("bravo"))); in test_http2_normalize_path()
1076 StringRef::from_lit("/alpha/%62ravo/"))); in test_http2_rewrite_clean_path()
1080 balloc, StringRef::from_lit("/delta%3a"))); in test_http2_rewrite_clean_path()
1086 balloc, StringRef::from_lit("/alpha/charlie/%2e././bravo/delta/.."))); in test_http2_rewrite_clean_path()
1089 http2::rewrite_clean_path(balloc, StringRef::from_lit("alpha%3a"))); in test_http2_rewrite_clean_path()
1091 CU_ASSERT("" == http2::rewrite_clean_path(balloc, StringRef{})); in test_http2_rewrite_clean_path()
1095 http2::rewrite_clean_path(balloc, StringRef::from_lit("//alpha?bravo"))); in test_http2_rewrite_clean_path()
1099 CU_ASSERT("/" == http2::get_pure_path_component(StringRef::from_lit("/"))); in test_http2_get_pure_path_component()
1102 http2::get_pure_path_component(StringRef::from_lit("/foo"))); in test_http2_get_pure_path_component()
1105 StringRef::from_lit("https://example.org/bar"))); in test_http2_get_pure_path_component()
1107 CU_ASSERT("/alpha" == http2::get_pure_path_component(StringRef::from_lit( in test_http2_get_pure_path_component()
1110 CU_ASSERT("/bravo" == http2::get_pure_path_component(StringRef::from_lit( in test_http2_get_pure_path_component()
1114 http2::get_pure_path_component(StringRef::from_lit("\x01\x02"))); in test_http2_get_pure_path_component()
1119 StringRef base, uri; in test_http2_construct_push_component()
1120 StringRef scheme, authority, path; in test_http2_construct_push_component()
1122 base = StringRef::from_lit("/b/"); in test_http2_construct_push_component()
1123 uri = StringRef::from_lit("https://example.org/foo"); in test_http2_construct_push_component()
1131 scheme = StringRef{}; in test_http2_construct_push_component()
1132 authority = StringRef{}; in test_http2_construct_push_component()
1133 path = StringRef{}; in test_http2_construct_push_component()
1135 uri = StringRef::from_lit("/foo/bar?q=a"); in test_http2_construct_push_component()
1143 scheme = StringRef{}; in test_http2_construct_push_component()
1144 authority = StringRef{}; in test_http2_construct_push_component()
1145 path = StringRef{}; in test_http2_construct_push_component()
1147 uri = StringRef::from_lit("foo/../bar?q=a"); in test_http2_construct_push_component()
1155 scheme = StringRef{}; in test_http2_construct_push_component()
1156 authority = StringRef{}; in test_http2_construct_push_component()
1157 path = StringRef{}; in test_http2_construct_push_component()
1159 uri = StringRef{}; in test_http2_construct_push_component()
1163 scheme = StringRef{}; in test_http2_construct_push_component()
1164 authority = StringRef{}; in test_http2_construct_push_component()
1165 path = StringRef{}; in test_http2_construct_push_component()
1167 uri = StringRef::from_lit("?q=a"); in test_http2_construct_push_component()
1177 CU_ASSERT(!http2::contains_trailers(StringRef::from_lit(""))); in test_http2_contains_trailers()
1178 CU_ASSERT(http2::contains_trailers(StringRef::from_lit("trailers"))); in test_http2_contains_trailers()
1180 CU_ASSERT(http2::contains_trailers(StringRef::from_lit("TRAILERS"))); in test_http2_contains_trailers()
1181 CU_ASSERT(!http2::contains_trailers(StringRef::from_lit("trailer"))); in test_http2_contains_trailers()
1182 CU_ASSERT(!http2::contains_trailers(StringRef::from_lit("trailers 3"))); in test_http2_contains_trailers()
1183 CU_ASSERT(http2::contains_trailers(StringRef::from_lit("trailers,"))); in test_http2_contains_trailers()
1184 CU_ASSERT(http2::contains_trailers(StringRef::from_lit("trailers,foo"))); in test_http2_contains_trailers()
1185 CU_ASSERT(http2::contains_trailers(StringRef::from_lit("foo,trailers"))); in test_http2_contains_trailers()
1186 CU_ASSERT(http2::contains_trailers(StringRef::from_lit("foo,trailers,bar"))); in test_http2_contains_trailers()
1188 http2::contains_trailers(StringRef::from_lit("foo, trailers ,bar"))); in test_http2_contains_trailers()
1189 CU_ASSERT(http2::contains_trailers(StringRef::from_lit(",trailers"))); in test_http2_contains_trailers()