1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 02:17:05 +00:00
Former-commit-id: 7b5d5530279789a3118190feb57776948b305662
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-06-07 21:07:08 +03:00
parent 9c92952a40
commit 7af5f139e0
40 changed files with 73 additions and 73 deletions

View File

@@ -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
View File

@@ -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"

View File

@@ -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 {

View File

@@ -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