Lines Matching refs:got
44 if got, want := xfp, "foo, http"; got != want {
45 t.Errorf("X-Forwarded-Proto = %q; want %q", got, want)
59 if got, want := res.status, 200; got != want {
60 t.Errorf("status = %v; want %v", got, want)
69 if got, want := xfp, "foo"; got != want {
70 t.Errorf("X-Forwarded-Proto = %q; want %q", got, want)
84 if got, want := res.status, 200; got != want {
85 t.Errorf("status = %v; want %v", got, want)
94 if got, want := xfp, "http"; got != want {
95 t.Errorf("X-Forwarded-Proto = %q; want %q", got, want)
109 if got, want := res.status, 200; got != want {
110 t.Errorf("status = %v; want %v", got, want)
118 if got, found := r.Header["X-Forwarded-Proto"]; found {
119 t.Errorf("X-Forwarded-Proto = %q; want nothing", got)
133 if got, want := res.status, 200; got != want {
134 t.Errorf("status = %v; want %v", got, want)
156 if got, want := res.status, 200; got != want {
157 t.Errorf("status = %v; want %v", got, want)
182 if got, want := res.status, 200; got != want {
183 t.Errorf("status = %v; want %v", got, want)
206 if got, want := res.status, 200; got != want {
207 t.Errorf("status = %v; want %v", got, want)
236 if got, want := res.status, 200; got != want {
237 t.Errorf("status = %v; want %v", got, want)
247 got := r.Header.Get("Forwarded")
249 if !validFwd.MatchString(got) {
250 t.Errorf("Forwarded = %v; want pattern %v", got, pattern)
261 if got, want := res.status, 200; got != want {
262 t.Errorf("status: %v; want %v", got, want)
272 if got := r.Header.Get("Forwarded"); !validFwd.MatchString(got) {
273 t.Errorf("Forwarded = %v; want pattern %v", got, pattern)
284 if got, want := res.status, 200; got != want {
285 t.Errorf("status: %v; want %v", got, want)
294 if got := r.Header.Get("Forwarded"); got != want {
295 t.Errorf("Forwarded = %v; want %v", got, want)
306 if got, want := res.status, 200; got != want {
307 t.Errorf("status: %v; want %v", got, want)
316 if got, want := r.Header.Get("Forwarded"), `host=foo, proto=http`; got != want {
317 t.Errorf("Forwarded = %v; want %v", got, want)
331 if got, want := res.status, 200; got != want {
332 t.Errorf("status: %v; want %v", got, want)
341 if got, want := r.Header.Get("Forwarded"), `proto=http`; got != want {
342 t.Errorf("Forwarded = %v; want %v", got, want)
356 if got, want := res.status, 200; got != want {
357 t.Errorf("status: %v; want %v", got, want)
365 if got, found := r.Header["Forwarded"]; found {
366 t.Errorf("Forwarded = %v; want nothing", got)
380 if got, want := res.status, 200; got != want {
381 t.Errorf("status: %v; want %v", got, want)
392 if got := r.Header.Get("Forwarded"); !validFwd.MatchString(got) {
393 t.Errorf("Forwarded = %v; want pattern %v", got, pattern)
404 if got, want := res.status, 200; got != want {
405 t.Errorf("status: %v; want %v", got, want)
413 if got, want := r.Header.Get("Via"), "2 nghttpx"; got != want {
414 t.Errorf("Via: %v; want %v", got, want)
425 if got, want := res.header.Get("Via"), "1.1 nghttpx"; got != want {
426 t.Errorf("Via: %v; want %v", got, want)
434 if got, want := r.Header.Get("Via"), "foo, 2 nghttpx"; got != want {
435 t.Errorf("Via: %v; want %v", got, want)
450 if got, want := res.header.Get("Via"), "bar, 1.1 nghttpx"; got != want {
451 t.Errorf("Via: %v; want %v", got, want)
459 if got, want := r.Header.Get("Via"), "foo"; got != want {
460 t.Errorf("Via: %v; want %v", got, want)
475 if got, want := res.header.Get("Via"), "bar"; got != want {
476 t.Errorf("Via: %v; want %v", got, want)
493 if got, want := res.status, 200; got != want {
494 t.Errorf("status: %v; want %v", got, want)
496 if got, want := res.header.Get("request-host"), st.backendHost; got != want {
497 t.Errorf("request-host: %v; want %v", got, want)
515 if got, want := res.status, 200; got != want {
516 t.Errorf("status: %v; want %v", got, want)
518 if got, want := res.header.Get("request-host"), st.frontendHost; got != want {
519 t.Errorf("request-host: %v; want %v", got, want)
592 if got := res.header.Get("Location"); got != want {
593 t.Errorf("Location: %v; want %v", got, want)
601 if got := fmt.Sprint(r.TransferEncoding); got != want {
602 t.Errorf("Transfer-Encoding: %v; want %v", got, want)
609 if got := string(body); got != want {
610 t.Errorf("body: %v; want %v", got, want)
623 if got, want := res.status, 200; got != want {
624 t.Errorf("status = %v; want %v", got, want)
646 if got, want := res.errCode, http2.ErrCodeProtocol; got != want {
647 t.Errorf("res.errCode: %v; want %v", got, want)
668 if got, want := res.errCode, http2.ErrCodeProtocol; got != want {
669 t.Errorf("res.errCode: %v; want %v", got, want)
709 if got, want := res.status, 501; got != want {
710 t.Errorf("status: %v; want %v", got, want)
729 if got, want := res.errCode, http2.ErrCodeProtocol; got != want {
730 t.Errorf("res.errCode: %v; want %v", got, want)
749 if got, want := res.errCode, http2.ErrCodeProtocol; got != want {
750 t.Errorf("res.errCode: %v; want %v", got, want)
758 if got, want := r.Header.Get("Cookie"), "alpha; bravo; charlie"; got != want {
759 t.Errorf("Cookie: %v; want %v", got, want)
775 if got, want := res.status, 200; got != want {
776 t.Errorf("status: %v; want %v", got, want)
795 if got, want := res.status, 200; got != want {
796 t.Errorf("status: %v; want %v", got, want)
817 if got, want := res.errCode, http2.ErrCodeProtocol; got != want {
835 if got, want := cert.Subject.CommonName, "alt-domain"; got != want {
836 t.Errorf("CommonName: %v; want %v", got, want)
845 if got, want := r.Header.Get("x-forwarded-proto"), "http"; got != want {
846 t.Errorf("x-forwarded-proto: want %v; got %v", want, got)
857 if got, want := res.status, 200; got != want {
858 t.Errorf("res.status: %v; want %v", got, want)
879 if got, want := res.status, 200; got != want {
880 t.Errorf("res.status: %v; want %v", got, want)
882 if got, want := len(res.pushResponse), 2; got != want {
883 t.Fatalf("len(res.pushResponse): %v; want %v", got, want)
886 if got, want := mainCSS.status, 200; got != want {
887 t.Errorf("mainCSS.status: %v; want %v", got, want)
890 if got, want := themeCSS.status, 200; got != want {
891 t.Errorf("themeCSS.status: %v; want %v", got, want)
909 if got, want := r.Trailer.Get("foo"), "bar"; got != want {
910 t.Errorf("r.Trailer.Get(foo): %v; want %v", got, want)
925 if got, want := res.status, 200; got != want {
926 t.Errorf("res.status: %v; want %v", got, want)
944 if got, want := res.status, 431; got != want {
945 t.Errorf("status: %v; want %v", got, want)
965 if got, want := res.status, 431; got != want {
966 t.Errorf("status: %v; want %v", got, want)
974 if got, want := r.Header.Get("User-Agent"), "mruby"; got != want {
975 t.Errorf("User-Agent = %v; want %v", got, want)
987 if got, want := res.status, 200; got != want {
988 t.Errorf("status = %v; want %v", got, want)
1007 if got, want := res.status, 404; got != want {
1008 t.Errorf("status = %v; want %v", got, want)
1018 if got, want := res.header.Get(tt.k), tt.v; got != want {
1019 t.Errorf("%v = %v; want %v", tt.k, got, want)
1023 if got, want := string(res.body), "Hello World from req"; got != want {
1024 t.Errorf("body = %v; want %v", got, want)
1041 if got, want := res.status, 200; got != want {
1042 t.Errorf("status = %v; want %v", got, want)
1045 if got, want := res.header.Get("alpha"), "bravo"; got != want {
1046 t.Errorf("alpha = %v; want %v", got, want)
1063 if got, want := res.status, 404; got != want {
1064 t.Errorf("status = %v; want %v", got, want)
1074 if got, want := res.header.Get(tt.k), tt.v; got != want {
1075 t.Errorf("%v = %v; want %v", tt.k, got, want)
1079 if got, want := string(res.body), "Hello World from resp"; got != want {
1080 t.Errorf("body = %v; want %v", got, want)
1102 if got, want := res.status, 101; got != want {
1103 t.Errorf("res.status: %v; want %v", got, want)
1112 if got, want := res.status, 200; got != want {
1113 t.Errorf("res.status: %v; want %v", got, want)
1124 if got := r.Header.Get("Forwarded"); !validFwd.MatchString(got) {
1125 t.Errorf("Forwarded: %v; want pattern %v", got, pattern)
1140 if got, want := res.status, 200; got != want {
1141 t.Errorf("res.status: %v; want %v", got, want)
1150 if got, want := r.Header.Get("X-Forwarded-For"), "192.168.0.2"; got != want {
1151 t.Errorf("X-Forwarded-For: %v; want %v", got, want)
1153 if got, want := r.Header.Get("Forwarded"), "for=192.168.0.2"; got != want {
1154 t.Errorf("Forwarded: %v; want %v", got, want)
1169 if got, want := res.status, 200; got != want {
1170 t.Errorf("res.status: %v; want %v", got, want)
1179 …if got, want := r.Header.Get("X-Forwarded-For"), "2001:0db8:85a3:0000:0000:8a2e:0370:7334"; got !=…
1180 t.Errorf("X-Forwarded-For: %v; want %v", got, want)
1182 …if got, want := r.Header.Get("Forwarded"), `for="[2001:0db8:85a3:0000:0000:8a2e:0370:7334]"`; got …
1183 t.Errorf("Forwarded: %v; want %v", got, want)
1198 if got, want := res.status, 200; got != want {
1199 t.Errorf("res.status: %v; want %v", got, want)
1207 if got, notWant := r.Header.Get("X-Forwarded-For"), "192.168.0.2"; got == notWant {
1208 t.Errorf("X-Forwarded-For: %v; want something else", got)
1210 if got, notWant := r.Header.Get("Forwarded"), "for=192.168.0.2"; got == notWant {
1211 t.Errorf("Forwarded: %v; want something else", got)
1226 if got, want := res.status, 200; got != want {
1227 t.Errorf("res.status: %v; want %v", got, want)
1247 if got, want := res.status, 200; got != want {
1248 t.Errorf("res.status: %v; want %v", got, want)
1515 if got, want := r.Header.Get("X-Forwarded-For"), "192.168.0.2"; got != want {
1516 t.Errorf("X-Forwarded-For: %v; want %v", got, want)
1518 if got, want := r.Header.Get("Forwarded"), "for=192.168.0.2"; got != want {
1519 t.Errorf("Forwarded: %v; want %v", got, want)
1547 if got, want := res.status, 200; got != want {
1548 t.Errorf("res.status: %v; want %v", got, want)
1557 if got, want := r.Header.Get("X-Forwarded-For"), "2001:db8:85a3::8a2e:370:7334"; got != want {
1558 t.Errorf("X-Forwarded-For: %v; want %v", got, want)
1560 if got, want := r.Header.Get("Forwarded"), `for="[2001:db8:85a3::8a2e:370:7334]"`; got != want {
1561 t.Errorf("Forwarded: %v; want %v", got, want)
1589 if got, want := res.status, 200; got != want {
1590 t.Errorf("res.status: %v; want %v", got, want)
1598 if got, want := r.Header.Get("X-Forwarded-For"), "127.0.0.1"; got != want {
1599 t.Errorf("X-Forwarded-For: %v; want %v", got, want)
1601 if got, want := r.Header.Get("Forwarded"), "for=127.0.0.1"; got != want {
1602 t.Errorf("Forwarded: %v; want %v", got, want)
1630 if got, want := res.status, 200; got != want {
1631 t.Errorf("res.status: %v; want %v", got, want)
1669 if got, want := r.Header.Get("X-Forwarded-For"), "127.0.0.1"; got != want {
1670 t.Errorf("X-Forwarded-For: %v; want %v", got, want)
1672 if got, want := r.Header.Get("Forwarded"), "for=127.0.0.1"; got != want {
1673 t.Errorf("Forwarded: %v; want %v", got, want)
1701 if got, want := res.status, 200; got != want {
1702 t.Errorf("res.status: %v; want %v", got, want)
1710 if got, want := r.Header.Get("X-Forwarded-For"), "127.0.0.1"; got != want {
1711 t.Errorf("X-Forwarded-For: %v; want %v", got, want)
1713 if got, want := r.Header.Get("Forwarded"), "for=127.0.0.1"; got != want {
1714 t.Errorf("Forwarded: %v; want %v", got, want)
1734 if got, want := res.status, 200; got != want {
1735 t.Errorf("res.status: %v; want %v", got, want)
1752 if got, want := res.status, 200; got != want {
1753 t.Errorf("status = %v; want %v", got, want)
1770 if got, want := res.status, 200; got != want {
1771 t.Errorf("status = %v; want %v", got, want)
1788 if got, want := res.status, 308; got != want {
1789 t.Errorf("status = %v; want %v", got, want)
1791 if got, want := res.header.Get("location"), "https://127.0.0.1/"; got != want {
1792 t.Errorf("location: %v; want %v", got, want)
1810 if got, want := res.status, 308; got != want {
1811 t.Errorf("status = %v; want %v", got, want)
1813 if got, want := res.header.Get("location"), "https://127.0.0.1:8443/foo?bar"; got != want {
1814 t.Errorf("location: %v; want %v", got, want)
1833 if got, want := res.status, 204; got != want {
1834 t.Errorf("status = %v; want %v", got, want)
1865 if got, want := res.status, 204; got != want {
1866 t.Errorf("status = %v; want %v", got, want)
1869 if got, found := res.header["Content-Length"]; found {
1870 t.Errorf("Content-Length = %v, want nothing", got)
1901 if got, want := res.status, 502; got != want {
1902 t.Errorf("status = %v; want %v", got, want)
1933 if got, want := res.status, 502; got != want {
1934 t.Errorf("status = %v; want %v", got, want)
1951 if got, want := res.status, 200; got != want {
1952 t.Errorf("status = %v; want %v", got, want)
1957 if got := res.header.Get("Set-Cookie"); !validCookie.MatchString(got) {
1958 t.Errorf("Set-Cookie: %v; want pattern %v", got, pattern)
1976 if got, want := res.status, 200; got != want {
1977 t.Errorf("status = %v; want %v", got, want)
1982 if got := res.header.Get("Set-Cookie"); !validCookie.MatchString(got) {
1983 t.Errorf("Set-Cookie: %v; want pattern %v", got, pattern)
2033 if got := numGoAway; got != want {
2034 t.Fatalf("numGoAway: %v; want %v", got, want)
2044 if got := f.ErrCode; got != want {
2045 t.Fatalf("f.ErrCode(%v): %v; want %v", numGoAway, got, want)
2050 if got := f.LastStreamID; got != want {
2051 t.Fatalf("f.LastStreamID(%v): %v; want %v", numGoAway, got, want)
2055 if got := f.LastStreamID; got != want {
2056 t.Fatalf("f.LastStreamID(%v): %v; want %v", numGoAway, got, want)
2080 if got, want := res.errCode, http2.ErrCodeInternal; got != want {
2081 t.Errorf("res.errCode: %v; want %v", got, want)
2100 if got, want := res.errCode, http2.ErrCodeInternal; got != want {
2101 t.Errorf("res.errCode: %v; want %v", got, want)
2139 if got, want := res.status, 200; got != want {
2140 t.Errorf("status: %v; want %v", got, want)
2142 if got, want := res.header.Get("request-host"), st.backendHost; got != want {
2143 t.Errorf("request-host: %v; want %v", got, want)
2161 if got, want := res.status, 200; got != want {
2162 t.Errorf("status: %v; want %v", got, want)
2164 if got, want := res.header.Get("request-host"), st.frontendHost; got != want {
2165 t.Errorf("request-host: %v; want %v", got, want)
2174 if got, want := r.Header.Get("x-forwarded-proto"), "http"; got != want {
2175 t.Errorf("x-forwarded-proto: want %v; got %v", want, got)
2186 if got, want := res.status, 200; got != want {
2187 t.Errorf("res.status: %v; want %v", got, want)
2196 if got, want := xfp, "foo, http"; got != want {
2197 t.Errorf("X-Forwarded-Proto = %q; want %q", got, want)
2211 if got, want := res.status, 200; got != want {
2212 t.Errorf("status = %v; want %v", got, want)
2221 if got, want := xfp, "foo"; got != want {
2222 t.Errorf("X-Forwarded-Proto = %q; want %q", got, want)
2236 if got, want := res.status, 200; got != want {
2237 t.Errorf("status = %v; want %v", got, want)
2246 if got, want := xfp, "http"; got != want {
2247 t.Errorf("X-Forwarded-Proto = %q; want %q", got, want)
2261 if got, want := res.status, 200; got != want {
2262 t.Errorf("status = %v; want %v", got, want)
2270 if got, found := r.Header["X-Forwarded-Proto"]; found {
2271 t.Errorf("X-Forwarded-Proto = %q; want nothing", got)
2285 if got, want := res.status, 200; got != want {
2286 t.Errorf("status = %v; want %v", got, want)
2308 if got, want := res.status, 200; got != want {
2309 t.Errorf("status = %v; want %v", got, want)
2334 if got, want := res.status, 200; got != want {
2335 t.Errorf("status = %v; want %v", got, want)
2358 if got, want := res.status, 200; got != want {
2359 t.Errorf("status = %v; want %v", got, want)
2384 if got, want := res.status, 200; got != want {
2385 t.Errorf("status = %v; want %v", got, want)
2395 if got := r.Header.Get("Forwarded"); !validFwd.MatchString(got) {
2396 t.Errorf("Forwarded = %v; want pattern %v", got, pattern)
2408 if got, want := res.status, 200; got != want {
2409 t.Errorf("status: %v; want %v", got, want)
2419 if got := r.Header.Get("Forwarded"); got != want {
2420 t.Errorf("Forwarded = %v; want %v", got, want)
2435 if got, want := res.status, 200; got != want {
2436 t.Errorf("status: %v; want %v", got, want)
2446 if got := r.Header.Get("Forwarded"); got != want {
2447 t.Errorf("Forwarded = %v; want %v", got, want)
2462 if got, want := res.status, 200; got != want {
2463 t.Errorf("status: %v; want %v", got, want)
2471 if got, found := r.Header["Forwarded"]; found {
2472 t.Errorf("Forwarded = %v; want nothing", got)
2487 if got, want := res.status, 200; got != want {
2488 t.Errorf("status: %v; want %v", got, want)
2507 if got, want := res.status, 404; got != want {
2508 t.Errorf("status = %v; want %v", got, want)
2518 if got, want := res.header.Get(tt.k), tt.v; got != want {
2519 t.Errorf("%v = %v; want %v", tt.k, got, want)
2523 if got, want := string(res.body), "Hello World from req"; got != want {
2524 t.Errorf("body = %v; want %v", got, want)
2541 if got, want := res.status, 404; got != want {
2542 t.Errorf("status = %v; want %v", got, want)
2552 if got, want := res.header.Get(tt.k), tt.v; got != want {
2553 t.Errorf("%v = %v; want %v", tt.k, got, want)
2557 if got, want := string(res.body), "Hello World from resp"; got != want {
2558 t.Errorf("body = %v; want %v", got, want)
2575 if got, want := res.status, 200; got != want {
2576 t.Errorf("status = %v; want %v", got, want)
2593 if got, want := res.status, 200; got != want {
2594 t.Errorf("status = %v; want %v", got, want)
2613 if got, want := res.status, 204; got != want {
2614 t.Errorf("status = %v; want %v", got, want)
2638 if got, want := res.status, 200; got != want {
2639 t.Errorf("res.status: %v; want %v", got, want)
2647 if got, want := apiResp.Status, "Success"; got != want {
2648 t.Errorf("apiResp.Status: %v; want %v", got, want)
2650 if got, want := apiResp.Code, 200; got != want {
2651 t.Errorf("apiResp.Status: %v; want %v", got, want)
2675 if got, want := res.status, 200; got != want {
2676 t.Errorf("res.status: %v; want %v", got, want)
2684 if got, want := apiResp.Status, "Success"; got != want {
2685 t.Errorf("apiResp.Status: %v; want %v", got, want)
2687 if got, want := apiResp.Code, 200; got != want {
2688 t.Errorf("apiResp.Status: %v; want %v", got, want)
2712 if got, want := res.status, 405; got != want {
2713 t.Errorf("res.status: %v; want %v", got, want)
2721 if got, want := apiResp.Status, "Failure"; got != want {
2722 t.Errorf("apiResp.Status: %v; want %v", got, want)
2724 if got, want := apiResp.Code, 405; got != want {
2725 t.Errorf("apiResp.Status: %v; want %v", got, want)
2744 if got, want := res.status, 200; got != want {
2745 t.Errorf("res.status: %v; want = %v", got, want)
2755 if got, want := apiResp.Status, "Success"; got != want {
2756 t.Errorf("apiResp.Status: %v; want %v", got, want)
2758 if got, want := apiResp.Code, 200; got != want {
2759 t.Errorf("apiResp.Status: %v; want %v", got, want)
2761 if got, want := apiResp.Data["configRevision"], json.Number("0"); got != want {
2762 t.Errorf(`apiResp.Data["configRevision"]: %v %t; want %v`, got, got, want)
2786 if got, want := res.status, 404; got != want {
2787 t.Errorf("res.status: %v; want %v", got, want)
2795 if got, want := apiResp.Status, "Failure"; got != want {
2796 t.Errorf("apiResp.Status: %v; want %v", got, want)
2798 if got, want := apiResp.Code, 404; got != want {
2799 t.Errorf("apiResp.Status: %v; want %v", got, want)
2817 if got, want := res.status, 200; got != want {
2818 t.Errorf("res.status: %v; want %v", got, want)
2837 if got, want := res.status, 404; got != want {
2838 t.Errorf("res.status: %v; want %v", got, want)