Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for hasContentLength (0.34 sec)

  1. src/net/http/httptest/recorder_test.go

    			for _, k := range keys {
    				_, ok := trailers[http.CanonicalHeaderKey(k)]
    				if ok {
    					return fmt.Errorf("unexpected trailer %s", k)
    				}
    			}
    			return nil
    		}
    	}
    	hasContentLength := func(length int64) checkFunc {
    		return func(rec *ResponseRecorder) error {
    			if got := rec.Result().ContentLength; got != length {
    				return fmt.Errorf("ContentLength = %d; want %d", got, length)
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 23:17:38 UTC 2022
    - 9.7K bytes
    - Viewed (0)
  2. src/net/http/h2_bundle.go

    			if cl, err := strconv.ParseUint(clen, 10, 63); err == nil {
    				rws.sentContentLen = int64(cl)
    			} else {
    				clen = ""
    			}
    		}
    		_, hasContentLength := rws.snapHeader["Content-Length"]
    		if !hasContentLength && clen == "" && rws.handlerDone && http2bodyAllowedForStatus(rws.status) && (len(p) > 0 || !isHeadResp) {
    			clen = strconv.Itoa(len(p))
    		}
    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