Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for bodySize (0.09 sec)

  1. src/net/http/serve_test.go

    		SetRSTAvoidanceDelay(t, timeout)
    		t.Logf("set RST avoidance delay to %v", timeout)
    
    		const bodySize = 5 << 20
    		req := []byte(fmt.Sprintf("POST / HTTP/1.1\r\nHost: foo.com\r\nContent-Length: %d\r\n\r\n", bodySize))
    		for i := 0; i < bodySize; i++ {
    			req = append(req, 'x')
    		}
    
    		cst := newClientServerTest(t, mode, HandlerFunc(func(w ResponseWriter, r *Request) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 202K bytes
    - Viewed (0)
  2. src/net/http/transport_test.go

    			io.Copy(io.Discard, conn)
    			copying.Done()
    		}()
    	})).ts
    	c := ts.Client()
    
    	const bodySize = 256 << 10
    	finalBit := make(byteFromChanReader, 1)
    	req, _ := NewRequest("POST", ts.URL, io.MultiReader(io.LimitReader(neverEnding('x'), bodySize-1), finalBit))
    	req.ContentLength = bodySize
    	res, err := c.Do(req)
    	if err := wantBody(res, err, "foo"); err != nil {
    		t.Errorf("POST response: %v", err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 192.6K bytes
    - Viewed (0)
Back to top