Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for dummyReq11 (0.07 sec)

  1. src/net/http/responsewrite_test.go

    				"abcdef",
    		},
    		// HTTP/1.1 response with unknown length and not setting connection: close
    		{
    			Response{
    				StatusCode:    200,
    				ProtoMajor:    1,
    				ProtoMinor:    1,
    				Request:       dummyReq11("GET"),
    				Header:        Header{},
    				Body:          io.NopCloser(strings.NewReader("abcdef")),
    				ContentLength: -1,
    				Close:         false,
    			},
    			"HTTP/1.1 200 OK\r\n" +
    				"Connection: close\r\n" +
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 07 01:07:32 UTC 2022
    - 6.9K bytes
    - Viewed (0)
  2. src/net/http/response_test.go

    	"regexp"
    	"strings"
    	"testing"
    )
    
    type respTest struct {
    	Raw  string
    	Resp Response
    	Body string
    }
    
    func dummyReq(method string) *Request {
    	return &Request{Method: method}
    }
    
    func dummyReq11(method string) *Request {
    	return &Request{Method: method, Proto: "HTTP/1.1", ProtoMajor: 1, ProtoMinor: 1}
    }
    
    var respTests = []respTest{
    	// Unchunked response without Content-Length.
    	{
    		"HTTP/1.0 200 OK\r\n" +
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 19:01:29 UTC 2024
    - 23.6K bytes
    - Viewed (0)
Back to top