mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 09:57:01 +00:00
resolve conflicts with current master v11.1.1
Former-commit-id: 659ff392e889f3a8552d7da3d44848f1a364f7b2
This commit is contained in:
4
cache/browser_test.go
vendored
4
cache/browser_test.go
vendored
@@ -91,13 +91,13 @@ func TestETag(t *testing.T) {
|
||||
e := httptest.New(t, app)
|
||||
|
||||
r := e.GET("/").Expect().Status(httptest.StatusOK)
|
||||
r.Header("ETag").Equal("/") // test if header setted.
|
||||
r.Header("ETag").Equal("/") // test if header set.
|
||||
r.Body().Equal("_")
|
||||
|
||||
e.GET("/").WithHeader("ETag", "/").WithHeader("If-None-Match", "/").Expect().
|
||||
Status(httptest.StatusNotModified).Body().Equal("") // browser is responsible, no the test engine.
|
||||
|
||||
r = e.GET("/").Expect().Status(httptest.StatusOK)
|
||||
r.Header("ETag").Equal("/") // test if header setted.
|
||||
r.Header("ETag").Equal("/") // test if header set.
|
||||
r.Body().Equal("__")
|
||||
}
|
||||
|
||||
2
cache/cfg/cfg.go
vendored
2
cache/cfg/cfg.go
vendored
@@ -16,7 +16,7 @@ var (
|
||||
RequestCacheTimeout = 5 * time.Second
|
||||
)
|
||||
|
||||
// NoCacheHeader is the static header key which is setted to the response when NoCache is called,
|
||||
// NoCacheHeader is the static header key which is set to the response when NoCache is called,
|
||||
// used inside nethttp and fhttp Skippers.
|
||||
var NoCacheHeader = "X-No-Cache"
|
||||
|
||||
|
||||
2
cache/entry/response.go
vendored
2
cache/entry/response.go
vendored
@@ -3,7 +3,7 @@ package entry
|
||||
import "net/http"
|
||||
|
||||
// Response is the cached response will be send to the clients
|
||||
// its fields setted at runtime on each of the non-cached executions
|
||||
// its fields set at runtime on each of the non-cached executions
|
||||
// non-cached executions = first execution, and each time after
|
||||
// cache expiration datetime passed.
|
||||
type Response struct {
|
||||
|
||||
2
cache/uri/uribuilder.go
vendored
2
cache/uri/uribuilder.go
vendored
@@ -62,7 +62,7 @@ func (r *URIBuilder) ContentType(s string) *URIBuilder {
|
||||
}
|
||||
|
||||
// String returns the full url which should be passed to get a cache entry response back
|
||||
// (it could be setted by server too but we need some client-freedom on the requested key)
|
||||
// (it could be set by server too but we need some client-freedom on the requested key)
|
||||
// in order to be sure that the registered cache entries are unique among different clients with the same key
|
||||
// note1: we do it manually*,
|
||||
// note2: on fasthttp that is not required because the query args added as expected but we will use it there too to be align with net/http
|
||||
|
||||
Reference in New Issue
Block a user