Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for Got1xxResponse (0.23 sec)

  1. src/net/http/httptrace/trace.go

    	// Continue" response.
    	Got100Continue func()
    
    	// Got1xxResponse is called for each 1xx informational response header
    	// returned before the final non-1xx response. Got1xxResponse is called
    	// for "100 Continue" responses, even if Got100Continue is also defined.
    	// If it returns an error, the client request is aborted with that error value.
    	Got1xxResponse func(code int, header textproto.MIMEHeader) error
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  2. src/net/http/httputil/reverseproxy.go

    // sends it to another server, proxying the response back to the
    // client.
    //
    // 1xx responses are forwarded to the client if the underlying
    // transport supports ClientTrace.Got1xxResponse.
    type ReverseProxy struct {
    	// Rewrite must be a function which modifies
    	// the request into a new request to be sent
    	// using Transport. Its response is then copied
    	// back to the original client unmodified.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 23:37:42 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  3. src/net/http/httputil/reverseproxy_test.go

    		t.Errorf("got response %q, want %q", got, want)
    	}
    }
    
    func Test1xxHeadersNotModifiedAfterRoundTrip(t *testing.T) {
    	// https://go.dev/issue/65123: We use httptrace.Got1xxResponse to capture 1xx responses
    	// and proxy them. httptrace handlers can execute after RoundTrip returns, in particular
    	// after experiencing connection errors. When this happens, we shouldn't modify the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 54.6K bytes
    - Viewed (0)
  4. api/go1.11.txt

    pkg net/http, type Cookie struct, SameSite SameSite
    pkg net/http, type SameSite int
    pkg net/http, type Transport struct, MaxConnsPerHost int
    pkg net/http/httptrace, type ClientTrace struct, Got1xxResponse func(int, textproto.MIMEHeader) error
    pkg net/http/httptrace, type ClientTrace struct, WroteHeaderField func(string, []string)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 22 03:48:56 UTC 2018
    - 25K bytes
    - Viewed (0)
  5. src/net/http/transport.go

    				return nil, errors.New("net/http: too many 1xx informational responses")
    			}
    			pc.readLimit = pc.maxHeaderResponseSize() // reset the limit
    			if trace != nil && trace.Got1xxResponse != nil {
    				if err := trace.Got1xxResponse(resCode, textproto.MIMEHeader(resp.Header)); err != nil {
    					return nil, err
    				}
    			}
    			continue
    		}
    		break
    	}
    	if resp.isProtocolSwitch() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 91K bytes
    - Viewed (0)
  6. src/net/http/clientserver_test.go

    			if v, ok := header[h]; ok {
    				t.Errorf("%s is %q; must not be sent", h, v)
    			}
    		}
    	}
    
    	var respCounter uint8
    	trace := &httptrace.ClientTrace{
    		Got1xxResponse: func(code int, header textproto.MIMEHeader) error {
    			switch respCounter {
    			case 0:
    				checkLinkHeaders(t, []string{"</style.css>; rel=preload; as=style", "</script.js>; rel=preload; as=script"}, header["Link"])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 46.6K bytes
    - Viewed (0)
  7. src/net/http/h2_bundle.go

    	resTrailer *Header // client's Response.Trailer
    }
    
    var http2got1xxFuncForTests func(int, textproto.MIMEHeader) error
    
    // get1xxTraceFunc returns the value of request's httptrace.ClientTrace.Got1xxResponse func,
    // if any. It returns nil if not set or if the Go version is too old.
    func (cs *http2clientStream) get1xxTraceFunc() func(int, textproto.MIMEHeader) error {
    	if fn := http2got1xxFuncForTests; fn != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 364.1K bytes
    - Viewed (0)
  8. src/net/http/transport_test.go

    	var got strings.Builder
    
    	req, _ := NewRequest("GET", cst.ts.URL, nil)
    	req = req.WithContext(httptrace.WithClientTrace(context.Background(), &httptrace.ClientTrace{
    		Got1xxResponse: func(code int, header textproto.MIMEHeader) error {
    			fmt.Fprintf(&got, "1xx: code=%v, header=%v\n", code, header)
    			return nil
    		},
    	}))
    	res, err := cst.c.Do(req)
    	if err != nil {
    		t.Fatal(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)
  9. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"ClientTrace.DNSDone", Field, 7},
    		{"ClientTrace.DNSStart", Field, 7},
    		{"ClientTrace.GetConn", Field, 7},
    		{"ClientTrace.Got100Continue", Field, 7},
    		{"ClientTrace.Got1xxResponse", Field, 11},
    		{"ClientTrace.GotConn", Field, 7},
    		{"ClientTrace.GotFirstResponseByte", Field, 7},
    		{"ClientTrace.PutIdleConn", Field, 7},
    		{"ClientTrace.TLSHandshakeDone", Field, 8},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top