Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 65 for wroteHeader (0.19 sec)

  1. src/archive/tar/writer.go

    		return tw.err
    	}
    	tw.pad = 0
    	return nil
    }
    
    // WriteHeader writes hdr and prepares to accept the file's contents.
    // The Header.Size determines how many bytes can be written for the next file.
    // If the current file is not fully written, then this returns an error.
    // This implicitly flushes any padding necessary before writing the header.
    func (tw *Writer) WriteHeader(hdr *Header) error {
    	if err := tw.Flush(); err != nil {
    		return err
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  2. src/net/http/clientserver_test.go

    				want := "string, invalid WriteHeader code 0"
    				if got != want {
    					t.Errorf("unexpected panic value:\n got: %v\nwant: %v\n", got, want)
    				}
    				gotpanic <- true
    
    				// Set an explicit 503. This also tests that the WriteHeader call panics
    				// before it recorded that an explicit value was set and that bogus
    				// value wasn't stuck.
    				w.WriteHeader(503)
    			}
    		}()
    		w.WriteHeader(0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 46.6K bytes
    - Viewed (0)
  3. internal/grid/manager.go

    				gridLogIf(context.Background(), err, err.Error())
    				w.WriteHeader(http.StatusInternalServerError)
    			}
    		}()
    		if debugPrint {
    			fmt.Printf("grid: Got a %s request for: %v\n", req.Method, req.URL)
    		}
    		ctx := req.Context()
    		if err := m.authRequest(req); err != nil {
    			gridLogOnceIf(ctx, fmt.Errorf("auth %s: %w", req.RemoteAddr, err), req.RemoteAddr)
    			w.WriteHeader(http.StatusForbidden)
    			return
    		}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 17:40:33 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

       */
      var sourceCount = 0
    
      val isClosed: Boolean
        get() = file == null
    
      @Throws(IOException::class)
      private fun writeHeader(
        prefix: ByteString,
        upstreamSize: Long,
        metadataSize: Long,
      ) {
        val header =
          Buffer().apply {
            write(prefix)
            writeLong(upstreamSize)
            writeLong(metadataSize)
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/util/proxy/streamtunnel_test.go

    	assert.True(t, errors.Is(err, http.ErrHijacked), "Hijacked error returned if writing after hijacked")
    	// Validate WriteHeader().
    	trw = &tunnelingResponseWriter{w: &mockResponseWriter{}}
    	expectedStatusCode := 201
    	assert.False(t, trw.written, "Written field originally false in delegate response writer")
    	trw.WriteHeader(expectedStatusCode)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 02:21:50 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  6. cmd/handler-api.go

    			defer func() { <-pool }()
    			globalHTTPStats.addRequestsInQueue(-1)
    			if contextCanceled(ctx) {
    				w.WriteHeader(499)
    				return
    			}
    			f.ServeHTTP(w, r)
    		case <-deadlineTimer.C:
    			globalHTTPStats.addRequestsInQueue(-1)
    			if contextCanceled(ctx) {
    				w.WriteHeader(499)
    				return
    			}
    			// Send a http timeout message
    			writeErrorResponse(ctx, w,
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Jun 12 08:13:12 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  7. src/cmd/go/proxy_test.go

    		n, err := strconv.Atoi(path[:j])
    		if err == nil && n >= 200 {
    			w.WriteHeader(n)
    			return
    		}
    		if strings.HasPrefix(path, "sumdb-") {
    			n, err := strconv.Atoi(path[len("sumdb-"):j])
    			if err == nil && n >= 200 {
    				if strings.HasPrefix(path[j:], "/sumdb/") {
    					w.WriteHeader(n)
    					return
    				}
    				path = path[j+1:]
    			}
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 03 09:56:24 UTC 2023
    - 12K bytes
    - Viewed (0)
  8. pkg/wasm/imagefetcher_test.go

    	var b bytes.Buffer
    	hasher := sha256.New()
    	mw := io.MultiWriter(&b, hasher)
    	tw := tar.NewWriter(mw)
    	defer tw.Close()
    
    	for filename, content := range contents {
    		if err := tw.WriteHeader(&tar.Header{
    			Name:     filename,
    			Size:     int64(len(content)),
    			Typeflag: tar.TypeReg,
    		}); err != nil {
    			return nil, err
    		}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Feb 05 04:15:17 UTC 2023
    - 16.3K bytes
    - Viewed (0)
  9. samples/extauthz/cmd/extauthz/main.go

    		response.Header().Set(receivedHeader, l)
    		response.WriteHeader(http.StatusOK)
    	} else {
    		log.Printf("[HTTP][denied]: %s", l)
    		response.Header().Set(resultHeader, resultDenied)
    		response.Header().Set(overrideHeader, request.Header.Get(overrideHeader))
    		response.Header().Set(receivedHeader, l)
    		response.WriteHeader(http.StatusForbidden)
    		_, _ = response.Write([]byte(denyBody))
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Feb 15 18:23:48 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  10. src/archive/tar/common.go

    // Some fields may not be populated.
    //
    // For forward compatibility, users that retrieve a Header from Reader.Next,
    // mutate it in some ways, and then pass it back to Writer.WriteHeader
    // should do so by creating a new Header and copying the fields
    // that they are interested in preserving.
    type Header struct {
    	// Typeflag is the type of header entry.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 15 16:01:50 UTC 2024
    - 24.7K bytes
    - Viewed (0)
Back to top