Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for StatusNotModified (0.28 sec)

  1. staging/src/k8s.io/apiserver/pkg/endpoints/discovery/aggregated/etag.go

    	// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match#directives
    	if clientCachedHash := req.Header.Get("If-None-Match"); quotedHash == clientCachedHash {
    		w.WriteHeader(http.StatusNotModified)
    		return
    	}
    
    	responsewriters.WriteObjectNegotiated(
    		serializer,
    		DiscoveryEndpointRestrictions,
    		targetGV,
    		w,
    		req,
    		http.StatusOK,
    		object,
    		true,
    	)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 18:15:22 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  2. cmd/object-handlers-common.go

    	if ifNoneMatchETagHeader != "" {
    		if isETagEqual(objInfo.ETag, ifNoneMatchETagHeader) {
    			// If the object ETag matches with the specified ETag.
    			writeHeadersPrecondition(w, objInfo)
    			w.WriteHeader(http.StatusNotModified)
    			return true
    		}
    	}
    
    	// If-Modified-Since : Return the object only if it has been modified since the specified time,
    	// otherwise return a 304 (not modified).
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:31:51 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/endpoints/discovery/aggregated/handler_test.go

    	second, secondBody, _ := fetchPath(manager, "application/json", discoveryPath, initial.Header.Get("ETag"))
    
    	assert.Equal(t, http.StatusOK, initial.StatusCode, "initial response should be 200 OK")
    	assert.Equal(t, http.StatusNotModified, second.StatusCode, "second response should be 304 Not Modified")
    	assert.Equal(t, initial.Header.Get("ETag"), second.Header.Get("ETag"), "ETag of both requests should be equal")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 02 00:29:39 UTC 2024
    - 28.6K bytes
    - Viewed (0)
  4. cmd/object-lambda-handlers.go

    	"Moved Permanently":               http.StatusMovedPermanently,
    	"Found":                           http.StatusFound,
    	"See Other":                       http.StatusSeeOther,
    	"Not Modified":                    http.StatusNotModified,
    	"Use Proxy":                       http.StatusUseProxy,
    	"Temporary Redirect":              http.StatusTemporaryRedirect,
    	"Permanent Redirect":              http.StatusPermanentRedirect,
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  5. src/net/http/fs.go

    	delete(h, "Content-Length")
    	delete(h, "Content-Encoding")
    	if h.Get("Etag") != "" {
    		delete(h, "Last-Modified")
    	}
    	w.WriteHeader(StatusNotModified)
    }
    
    // checkPreconditions evaluates request preconditions and reports whether a precondition
    // resulted in sending StatusNotModified or StatusPreconditionFailed.
    func checkPreconditions(w ResponseWriter, r *Request, modtime time.Time) (done bool, rangeHeader string) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 09 17:06:47 UTC 2024
    - 31.1K bytes
    - Viewed (0)
  6. cmd/object-handlers.go

    				return
    			}
    
    			okSt := (ci.StatusCode == http.StatusOK || ci.StatusCode == http.StatusPartialContent ||
    				ci.StatusCode == http.StatusPreconditionFailed || ci.StatusCode == http.StatusNotModified)
    			if okSt {
    				ci.WriteHeaders(w, func() {
    					// set common headers
    					setCommonHeaders(w)
    				}, func() {
    					okSt := (ci.StatusCode == http.StatusOK || ci.StatusCode == http.StatusPartialContent)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 14 13:28:35 UTC 2024
    - 124.2K bytes
    - Viewed (0)
  7. cmd/server_test.go

    	c.Assert(err, nil)
    	// Since the "If-Modified-Since" header was ahead in time compared to the actual
    	// modified time of the object expecting the response status to be http.StatusNotModified.
    	c.Assert(response.StatusCode, http.StatusNotModified)
    
    	// Again, obtain the object info.
    	// This time setting "If-Unmodified-Since" to a time after the object is modified.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 115.3K bytes
    - Viewed (0)
  8. src/net/http/clientserver_test.go

    func Test304Responses(t *testing.T) { run(t, test304Responses) }
    func test304Responses(t *testing.T, mode testMode) {
    	cst := newClientServerTest(t, mode, HandlerFunc(func(w ResponseWriter, r *Request) {
    		w.WriteHeader(StatusNotModified)
    		_, err := w.Write([]byte("illegal body"))
    		if err != ErrBodyNotAllowed {
    			t.Errorf("on Write, expected ErrBodyNotAllowed, got %v", err)
    		}
    	}))
    	defer cst.close()
    	res, err := cst.c.Get(cst.ts.URL)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 46.6K bytes
    - Viewed (0)
  9. src/net/http/fs_test.go

    	}
    	b, err := io.ReadAll(resp.Body)
    	resp.Body.Close()
    	if err != nil {
    		t.Fatal("reading Body:", err)
    	}
    	if len(b) != 0 {
    		t.Errorf("non-empty body")
    	}
    	if g, e := resp.StatusCode, StatusNotModified; g != e {
    		t.Errorf("status mismatch: got %d, want %d", g, e)
    	}
    	// HTTP1 transport sets ContentLength to 0.
    	if g, e1, e2 := resp.ContentLength, int64(-1), int64(0); g != e1 && g != e2 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 23:39:44 UTC 2024
    - 49.9K bytes
    - Viewed (0)
  10. src/net/http/serve_test.go

    	if string(all) != "hi" {
    		t.Errorf("Body = %q; want hi", all)
    	}
    }
    
    // Issue 6157, Issue 6685
    func TestCodesPreventingContentTypeAndBody(t *testing.T) {
    	for _, code := range []int{StatusNotModified, StatusNoContent} {
    		ht := newHandlerTest(HandlerFunc(func(w ResponseWriter, r *Request) {
    			if r.URL.Path == "/header" {
    				w.Header().Set("Content-Length", "123")
    			}
    			w.WriteHeader(code)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 202K bytes
    - Viewed (0)
Back to top