Lines Matching refs:http
9 "net/http"
31 if got, want := res.status, http.StatusOK; got != want {
52 if got, want := res.status, http.StatusOK; got != want {
61 handler: func(w http.ResponseWriter, r *http.Request) {
76 if got, want := res.status, http.StatusNotImplemented; got != want {
85 handler: func(w http.ResponseWriter, r *http.Request) {
97 resp, err := http.ReadResponse(bufio.NewReader(st.conn), nil)
99 t.Fatalf("Error http.ReadResponse() = %v", err)
104 if got, want := resp.StatusCode, http.StatusBadRequest; got != want {
131 // cleartext http.
146 if got, want := res.status, http.StatusOK; got != want {
174 if got, want := res.status, http.StatusOK; got != want {
197 if got, want := res.status, http.StatusOK; got != want {
214 if got, want := res.status, http.StatusOK; got != want {
233 handler: func(w http.ResponseWriter, r *http.Request) {
246 if got, want := res.status, http.StatusOK; got != want {
258 handler: func(w http.ResponseWriter, r *http.Request) {
268 resp, err := http.ReadResponse(bufio.NewReader(st.conn), nil)
270 t.Fatalf("Error http.ReadResponse() = %v", err)
275 if got, want := resp.StatusCode, http.StatusBadRequest; got != want {
284 handler: func(w http.ResponseWriter, r *http.Request) {
291 if _, err := io.WriteString(st.conn, "GET http://foo\"bar/ HTTP/1.1\r\nTest-Case: TestH1H1HBadAuthority\r\nHost: foobar\r\n\r\n"); err != nil {
294 resp, err := http.ReadResponse(bufio.NewReader(st.conn), nil)
296 t.Fatalf("Error http.ReadResponse() = %v", err)
301 if got, want := resp.StatusCode, http.StatusBadRequest; got != want {
310 handler: func(w http.ResponseWriter, r *http.Request) {
317 if _, err := io.WriteString(st.conn, "GET http*://example.com/ HTTP/1.1\r\nTest-Case: TestH1H1HBadScheme\r\nHost: example.com\r\n\r\n"); err != nil {
320 resp, err := http.ReadResponse(bufio.NewReader(st.conn), nil)
322 t.Fatalf("Error http.ReadResponse() = %v", err)
327 if got, want := resp.StatusCode, http.StatusBadRequest; got != want {
336 handler: func(w http.ResponseWriter, r *http.Request) {
347 resp, err := http.ReadResponse(bufio.NewReader(st.conn), nil)
349 t.Fatalf("Error http.ReadResponse() = %v", err)
354 if got, want := resp.StatusCode, http.StatusOK; got != want {
363 // field using actual backend server even if --no-http-rewrite is
367 handler: func(w http.ResponseWriter, r *http.Request) {
378 resp, err := http.ReadResponse(bufio.NewReader(st.conn), nil)
380 t.Fatalf("Error http.ReadResponse() = %v", err)
385 if got, want := resp.StatusCode, http.StatusOK; got != want {
397 handler: func(w http.ResponseWriter, r *http.Request) {
426 if got, want := res.status, http.StatusOK; got != want {
439 handler: func(w http.ResponseWriter, r *http.Request) {
453 if got, want := res.status, http.StatusRequestHeaderFieldsTooLarge; got != want {
463 handler: func(w http.ResponseWriter, r *http.Request) {
476 if got, want := res.status, http.StatusRequestHeaderFieldsTooLarge; got != want {
486 handler: func(w http.ResponseWriter, r *http.Request) {
504 if got, want := res.status, http.StatusRequestHeaderFieldsTooLarge; got != want {
536 handler: func(w http.ResponseWriter, r *http.Request) {
552 if got, want := res.status, http.StatusOK; got != want {
562 handler: func(w http.ResponseWriter, r *http.Request) {
576 if got, want := res.status, http.StatusNotFound; got != want {
602 handler: func(w http.ResponseWriter, r *http.Request) {
613 resp, err := http.ReadResponse(bufio.NewReader(st.conn), nil)
615 t.Fatalf("Error http.ReadResponse() = %v", err)
620 if got, want := resp.StatusCode, http.StatusNotFound; got != want {
649 resp, err = http.ReadResponse(bufio.NewReader(st.conn), nil)
651 t.Fatalf("Error http.ReadResponse() = %v", err)
656 if got, want := resp.StatusCode, http.StatusNotFound; got != want {
683 if got, want := res.status, http.StatusOK; got != want {
708 if got, want := res.status, http.StatusNotFound; got != want {
745 if got, want := res.status, http.StatusPermanentRedirect; got != want {
773 if got, want := res.status, http.StatusPermanentRedirect; got != want {
794 if got, want := res.status, http.StatusOK; got != want {
805 if got, want := res.status, http.StatusOK; got != want {
814 handler: func(w http.ResponseWriter, r *http.Request) {
816 w.WriteHeader(http.StatusNotFound)
827 resp, err := http.ReadResponse(bufio.NewReader(st.conn), nil)
829 t.Fatalf("Error http.ReadResponse() = %v", err)
834 if got, want := resp.StatusCode, http.StatusNotFound; got != want {
846 resp, err = http.ReadResponse(bufio.NewReader(st.conn), nil)
848 t.Fatalf("Error http.ReadResponse() = %v", err)
853 if got, want := resp.StatusCode, http.StatusOK; got != want {
887 handler: func(w http.ResponseWriter, r *http.Request) {
899 resp, err := http.ReadResponse(bufio.NewReader(st.conn), nil)
901 t.Fatalf("Error http.ReadResponse() = %v", err)
906 if got, want := resp.StatusCode, http.StatusBadRequest; got != want {
916 handler: func(w http.ResponseWriter, r *http.Request) {
927 resp, err := http.ReadResponse(bufio.NewReader(st.conn), nil)
929 t.Fatalf("Error http.ReadResponse() = %v", err)
934 if got, want := resp.StatusCode, http.StatusOK; got != want {
943 // field using actual backend server even if --no-http-rewrite is
948 handler: func(w http.ResponseWriter, r *http.Request) {
959 resp, err := http.ReadResponse(bufio.NewReader(st.conn), nil)
961 t.Fatalf("Error http.ReadResponse() = %v", err)
966 if got, want := resp.StatusCode, http.StatusOK; got != want {
981 handler: func(w http.ResponseWriter, r *http.Request) {
999 if got, want := res.status, http.StatusOK; got != want {
1009 handler: func(w http.ResponseWriter, r *http.Request) {
1034 handler: func(w http.ResponseWriter, r *http.Request) {
1063 handler: func(w http.ResponseWriter, r *http.Request) {
1095 handler: func(w http.ResponseWriter, r *http.Request) {
1109 if got, want := res.status, http.StatusNotFound; got != want {
1149 if got, want := res.status, http.StatusNotFound; got != want {
1175 handler: func(w http.ResponseWriter, r *http.Request) {
1193 if got, want := res.status, http.StatusOK; got != want {
1203 handler: func(w http.ResponseWriter, r *http.Request) {
1223 if got, want := res.status, http.StatusOK; got != want {
1245 handler: func(w http.ResponseWriter, r *http.Request) {
1265 if got, want := res.status, http.StatusOK; got != want {
1287 handler: func(w http.ResponseWriter, r *http.Request) {
1307 if got, want := res.status, http.StatusMethodNotAllowed; got != want {
1328 handler: func(w http.ResponseWriter, r *http.Request) {
1344 if got, want := res.status, http.StatusOK; got != want {
1371 handler: func(w http.ResponseWriter, r *http.Request) {
1391 if got, want := res.status, http.StatusNotFound; got != want {
1412 handler: func(w http.ResponseWriter, r *http.Request) {
1427 if got, want := res.status, http.StatusOK; got != want {
1437 handler: func(w http.ResponseWriter, r *http.Request) {
1449 resp, err := http.ReadResponse(bufio.NewReader(st.conn), nil)
1451 t.Fatalf("Error http.ReadResponse() = %v", err)
1456 if got, want := resp.StatusCode, http.StatusNotFound; got != want {
1465 handler: func(w http.ResponseWriter, r *http.Request) {
1466 hj, ok := w.(http.Hijacker)
1468 http.Error(w, "Could not hijack the connection", http.StatusInternalServerError)
1473 http.Error(w, err.Error(), http.StatusInternalServerError)
1498 handler: func(w http.ResponseWriter, r *http.Request) {
1510 resp, err := http.ReadResponse(bufio.NewReader(st.conn), nil)
1512 t.Fatalf("Error http.ReadResponse() = %v", err)
1517 if got, want := resp.StatusCode, http.StatusBadRequest; got != want {
1526 handler: func(w http.ResponseWriter, r *http.Request) {
1527 hj, ok := w.(http.Hijacker)
1529 http.Error(w, "Could not hijack the connection", http.StatusInternalServerError)
1534 http.Error(w, err.Error(), http.StatusInternalServerError)
1553 if got, want := res.status, http.StatusBadGateway; got != want {
1562 handler: func(w http.ResponseWriter, r *http.Request) {
1563 hj, ok := w.(http.Hijacker)
1565 http.Error(w, "Could not hijack the connection", http.StatusInternalServerError)
1570 http.Error(w, err.Error(), http.StatusInternalServerError)
1610 handler: func(w http.ResponseWriter, r *http.Request) {
1621 resp, err := http.ReadResponse(bufio.NewReader(st.conn), nil)
1623 t.Fatalf("Error http.ReadResponse() = %v", err)
1628 if got, want := resp.StatusCode, http.StatusBadRequest; got != want {