Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for readBody (0.15 sec)

  1. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go

    	readBody, err := limitedReadBody(req, limit)
    	if err == nil {
    		// only record if we've read successfully
    		requestmetrics.RecordRequestBodySize(ctx, resourceGroup, verb, len(readBody))
    	}
    	return readBody, err
    }
    
    func isDryRun(url *url.URL) bool {
    	return len(url.Query()["dryRun"]) != 0
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 08 21:44:00 UTC 2023
    - 17K bytes
    - Viewed (0)
  2. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

            if (response.code == 100) {
              readBody = true
            }
          }
    
          val body = Buffer()
          val requestLine = "$method $path HTTP/1.1"
          var exception: IOException? = null
          if (readBody && peek.streamHandler == null && peek.socketPolicy !is DoNotReadRequestBody) {
            try {
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 37.4K bytes
    - Viewed (0)
  3. src/net/http/serve_test.go

    	chunked          bool
    	expectation      string // e.g. "100-continue"
    	readBody         bool   // whether handler should read the body (if false, sends StatusUnauthorized)
    	expectedResponse string // expected substring in first line of http response
    }
    
    func expectTest(contentLength int, expectation string, readBody bool, expectedResponse string) serverExpectTest {
    	return serverExpectTest{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 202K bytes
    - Viewed (0)
  4. src/net/http/transport_test.go

    func testTransportClosesBodyOnError(t *testing.T, mode testMode) {
    	readBody := make(chan error, 1)
    	ts := newClientServerTest(t, mode, HandlerFunc(func(w ResponseWriter, r *Request) {
    		_, err := io.ReadAll(r.Body)
    		readBody <- err
    	})).ts
    	c := ts.Client()
    	fakeErr := errors.New("fake error")
    	didClose := make(chan bool, 1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 192.6K bytes
    - Viewed (0)
  5. internal/ioutil/read_file.go

    // Because ReadFile reads the whole file, it does not treat an EOF from Read
    // as an error to be reported.
    func ReadFileWithFileInfo(name string) ([]byte, fs.FileInfo, error) {
    	f, err := OsOpenFile(name, readMode, 0o666)
    	if err != nil {
    		return nil, nil, err
    	}
    	defer f.Close()
    
    	st, err := f.Stat()
    	if err != nil {
    		return nil, nil, err
    	}
    
    	dst := make([]byte, st.Size())
    	_, err = io.ReadFull(f, dst)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sat Dec 09 18:17:51 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  6. cmd/xl-storage_noatime_notsupported.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package cmd
    
    import (
    	"os"
    )
    
    var (
    	// No special option for reads on windows
    	readMode = os.O_RDONLY
    
    	// Write with sync no buffering only used only for `xl.meta` writes
    	writeMode = os.O_SYNC
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Aug 19 01:35:22 UTC 2021
    - 1K bytes
    - Viewed (0)
  7. src/internal/types/errors/codes_test.go

    				err := checkExample(t, example)
    				if err == nil {
    					t.Fatalf("no error in example #%d", i)
    				}
    				typerr, ok := err.(Error)
    				if !ok {
    					t.Fatalf("not a types.Error: %v", err)
    				}
    				if got := readCode(typerr); got != value {
    					t.Errorf("%s: example #%d returned code %d (%s), want %d", name, i, got, err, value)
    				}
    			}
    		})
    	})
    }
    
    func walkCodes(t *testing.T, f func(string, int, *ast.ValueSpec)) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 18 20:41:45 UTC 2022
    - 4.9K bytes
    - Viewed (0)
  8. internal/ioutil/read_file_noatime_supported.go

    //
    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package ioutil
    
    import (
    	"os"
    )
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Aug 19 01:35:22 UTC 2021
    - 937 bytes
    - Viewed (0)
  9. internal/ioutil/read_file_noatime_notsupported.go

    //
    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package ioutil
    
    import "os"
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Aug 19 01:35:22 UTC 2021
    - 893 bytes
    - Viewed (0)
  10. platforms/core-configuration/core-serialization-codecs/src/main/kotlin/org/gradle/internal/serialize/codecs/core/WorkNodeCodec.kt

            val nodeCount = readSmallInt()
            val nodes = ArrayList<Node>(nodeCount)
            val nodesById = HashMap<Int, Node>(nodeCount)
            for (i in 0 until nodeCount) {
                val node = readNode()
                nodesById[nodesById.size] = node
                if (node is LocalTaskNode) {
                    node.prepareNode.require()
                    nodesById[nodesById.size] = node.prepareNode
                }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:30 UTC 2024
    - 10.4K bytes
    - Viewed (0)
Back to top