Add max-stale cache control directive to requests
This commit is contained in:
parent
8dd4612ea7
commit
1a34c8d5ff
|
@ -350,6 +350,7 @@ func (xTransport *XTransport) Fetch(method string, url *url.URL, accept string,
|
||||||
if len(contentType) > 0 {
|
if len(contentType) > 0 {
|
||||||
header["Content-Type"] = []string{contentType}
|
header["Content-Type"] = []string{contentType}
|
||||||
}
|
}
|
||||||
|
header["Cache-Control"] = []string{"max-stale"}
|
||||||
if body != nil {
|
if body != nil {
|
||||||
h := sha512.Sum512(*body)
|
h := sha512.Sum512(*body)
|
||||||
qs := url.Query()
|
qs := url.Query()
|
||||||
|
|
Loading…
Reference in New Issue