Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 157 for wroteHeader (0.22 sec)

  1. platforms/software/dependency-management/src/main/java/org/gradle/api/internal/catalog/RootProjectAccessorSourceGenerator.java

            } catch (IOException e) {
                throw new UncheckedIOException(e);
            }
        }
    
        private void generate(String packageName, String className, ProjectDescriptor current) throws IOException {
            writeHeader(packageName);
            writeLn("@NonNullApi");
            writeLn("public class " + className + " extends TypeSafeProjectDependencyFactory {\n");
            writeLn();
            writeLn("    @Inject");
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/endpoints/responsewriter/fake.go

    // it is used for testing purpose only
    type FakeResponseWriter struct{}
    
    func (fw *FakeResponseWriter) Header() http.Header          { return http.Header{} }
    func (fw *FakeResponseWriter) WriteHeader(code int)         {}
    func (fw *FakeResponseWriter) Write(bs []byte) (int, error) { return len(bs), nil }
    
    // For HTTP2 an http.ResponseWriter object implements
    // http.Flusher and http.CloseNotifier.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 01 19:58:11 UTC 2021
    - 1.8K bytes
    - Viewed (0)
  3. pkg/istio-agent/health/health_check_test.go

    			if httpServerEventCount < len(httpHealthStatuses) && httpHealthStatuses[httpServerEventCount] {
    				writer.WriteHeader(http.StatusOK)
    				writer.Write([]byte("foobar"))
    			} else {
    				writer.WriteHeader(http.StatusInternalServerError)
    			}
    			httpServerEventCount++
    		}))
    		host, ports, err := net.SplitHostPort(strings.TrimPrefix(sss.URL, "http://"))
    		if err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Aug 09 16:50:11 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  4. platforms/software/plugins-version-catalog/src/main/java/org/gradle/api/plugins/catalog/internal/TomlWriter.java

            } catch (IOException ex) {
                throw new RuntimeException(ex);
            }
            return this;
        }
    
        public void generate(DefaultVersionCatalog model) {
            writeHeader();
            writeMetadata();
            writeVersions(model);
            writeLibraries(model);
            writeBundles(model);
            writePlugins(model);
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Dec 11 13:37:56 UTC 2023
    - 7.2K bytes
    - Viewed (0)
  5. 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)
  6. pkg/h2c/wrapper.go

    	return denyH2cUpgrade(h2c.NewHandler(h, s))
    }
    
    func denyH2cUpgrade(h http.Handler) http.Handler {
    	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
    		if isH2CUpgrade(r.Header) {
    			w.WriteHeader(http.StatusMethodNotAllowed)
    			_, _ = w.Write([]byte("h2c upgrade not allowed"))
    			return
    		}
    		h.ServeHTTP(w, r)
    	})
    }
    
    func isH2CUpgrade(h http.Header) bool {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Nov 09 08:02:48 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  7. src/net/http/httputil/reverseproxy_test.go

    type testResponseWriter struct {
    	h           http.Header
    	writeHeader func(int)
    	write       func([]byte) (int, error)
    }
    
    func (rw *testResponseWriter) Header() http.Header {
    	if rw.h == nil {
    		rw.h = make(http.Header)
    	}
    	return rw.h
    }
    
    func (rw *testResponseWriter) WriteHeader(statusCode int) {
    	if rw.writeHeader != nil {
    		rw.writeHeader(statusCode)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 54.6K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. staging/src/k8s.io/apiserver/pkg/server/filters/goaway_test.go

    	watchHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
    		timer := time.NewTicker(time.Second)
    		defer timer.Stop()
    
    		w.Header().Set("Transfer-Encoding", "chunked")
    		w.WriteHeader(200)
    
    		flusher, _ := w.(http.Flusher)
    		flusher.Flush()
    
    		count := 0
    		for {
    			<-timer.C
    			n, err := w.Write(responseBody[count : count+1])
    			if err != nil {
    				return
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 17 12:58:54 UTC 2021
    - 13.9K bytes
    - Viewed (0)
Back to top