Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for ProtoMinor (0.34 sec)

  1. src/net/http/request.go

    	// For client requests, these fields are ignored. The HTTP
    	// client code always uses either HTTP/1.1 or HTTP/2.
    	// See the docs on Transport for details.
    	Proto      string // "HTTP/1.0"
    	ProtoMajor int    // 1
    	ProtoMinor int    // 0
    
    	// Header contains the request header fields either received
    	// by the server or to be sent by the client.
    	//
    	// If a server received a request with header lines,
    	//
    	//	Host: example.com
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 49.4K bytes
    - Viewed (0)
  2. internal/rest/client.go

    	if !ok && body != nil {
    		rc = io.NopCloser(body)
    	}
    	req := &http.Request{
    		Method:     http.MethodPost,
    		URL:        &u,
    		Proto:      "HTTP/1.1",
    		ProtoMajor: 1,
    		ProtoMinor: 1,
    		Header:     make(http.Header),
    		Body:       rc,
    		Host:       u.Host,
    	}
    	req = req.WithContext(ctx)
    	if body != nil {
    		switch v := body.(type) {
    		case *bytes.Buffer:
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  3. src/net/http/transport_test.go

    			if err != nil {
    				t.Fatalf("URL parse error: %v", err)
    			}
    			req.Method = "GET"
    			req.Proto = "HTTP/1.1"
    			req.ProtoMajor = 1
    			req.ProtoMinor = 1
    
    			res, err := c.Do(req)
    			if err != nil {
    				t.Fatalf("error in connectionClose=%v, req #%d, Do: %v", connectionClose, n, err)
    			}
    			defer res.Body.Close()
    			body, err := io.ReadAll(res.Body)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 192.6K bytes
    - Viewed (0)
  4. src/net/http/clientserver_test.go

    func (tt h12Compare) normalizeRes(t *testing.T, res *Response, wantProto string) {
    	if res.Proto == wantProto || res.Proto == "HTTP/IGNORE" {
    		res.Proto, res.ProtoMajor, res.ProtoMinor = "", 0, 0
    	} else {
    		t.Errorf("got %q response; want %q", res.Proto, wantProto)
    	}
    	slurp, err := io.ReadAll(res.Body)
    
    	res.Body.Close()
    	res.Body = slurpResult{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 46.6K bytes
    - Viewed (0)
  5. src/net/http/server.go

    	if req.ProtoMajor == 1 {
    		return true
    	}
    	// Accept "PRI * HTTP/2.0" upgrade requests, so Handlers can
    	// wire up their own HTTP/2 upgrades.
    	if req.ProtoMajor == 2 && req.ProtoMinor == 0 &&
    		req.Method == "PRI" && req.RequestURI == "*" {
    		return true
    	}
    	// Reject HTTP/0.x, and all other HTTP/2+ requests (which
    	// aren't encoded in ASCII anyway).
    	return false
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 123.4K bytes
    - Viewed (0)
  6. src/net/http/h2_bundle.go

    	req := &Request{
    		Method:     rp.method,
    		URL:        url_,
    		RemoteAddr: sc.remoteAddrStr,
    		Header:     rp.header,
    		RequestURI: requestURI,
    		Proto:      "HTTP/2.0",
    		ProtoMajor: 2,
    		ProtoMinor: 0,
    		TLS:        tlsState,
    		Host:       rp.authority,
    		Body:       body,
    		Trailer:    trailer,
    	}
    	req = req.WithContext(st.ctx)
    
    	rw := sc.newResponseWriter(st, req)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 364.1K bytes
    - Viewed (0)
Back to top