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
|
@ -399,6 +399,15 @@ func getObject(hc *handlerContext, bktName, objName string) ([]byte, http.Header
|
|||
return getObjectBase(hc, w, r)
|
||||
}
|
||||
|
||||
func getObjectWithHeaders(hc *handlerContext, bktName, objName string, headers map[string]string) *httptest.ResponseRecorder {
|
||||
w, r := prepareTestRequest(hc, bktName, objName, nil)
|
||||
for k, v := range headers {
|
||||
r.Header.Set(k, v)
|
||||
}
|
||||
hc.Handler().GetObjectHandler(w, r)
|
||||
return w
|
||||
}
|
||||
|
||||
func getObjectBase(hc *handlerContext, w *httptest.ResponseRecorder, r *http.Request) ([]byte, http.Header) {
|
||||
hc.Handler().GetObjectHandler(w, r)
|
||||
assertStatus(hc.t, w, http.StatusOK)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue