forked from TrueCloudLab/frostfs-s3-gw
[#538] Return headers with 304 Not Modified
Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
This commit is contained in:
parent
fb00dff83b
commit
eff0de43d5
6 changed files with 116 additions and 26 deletions
|
@ -578,6 +578,18 @@ func checkFound(t *testing.T, hc *handlerContext, bktName, objName, version stri
|
|||
assertStatus(t, w, http.StatusOK)
|
||||
}
|
||||
|
||||
func headObjectWithHeaders(hc *handlerContext, bktName, objName, version string, headers map[string]string) *httptest.ResponseRecorder {
|
||||
query := make(url.Values)
|
||||
query.Add(api.QueryVersionID, version)
|
||||
|
||||
w, r := prepareTestFullRequest(hc, bktName, objName, query, nil)
|
||||
for k, v := range headers {
|
||||
r.Header.Set(k, v)
|
||||
}
|
||||
hc.Handler().HeadObjectHandler(w, r)
|
||||
return w
|
||||
}
|
||||
|
||||
func headObjectBase(hc *handlerContext, bktName, objName, version string) *httptest.ResponseRecorder {
|
||||
query := make(url.Values)
|
||||
query.Add(api.QueryVersionID, version)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue