[#563] Ignore precondition headers with invalid date format #563

Merged
alexvanin merged 1 commit from mbiryukova/frostfs-s3-gw:bugfix/precondition_headers into master 2024-11-28 06:06:25 +00:00
Member

Signed-off-by: Marina Biryukova m.biryukova@yadro.com

Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
mbiryukova self-assigned this 2024-11-26 10:34:27 +00:00
mbiryukova added 1 commit 2024-11-26 10:34:28 +00:00
[#xxx] Ignore precondition headers with invalid date format
Some checks failed
/ DCO (pull_request) Failing after 1m49s
/ Vulncheck (pull_request) Successful in 2m32s
/ Builds (pull_request) Successful in 2m35s
/ Lint (pull_request) Successful in 3m59s
/ Tests (pull_request) Successful in 3m5s
04177c9936
Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
mbiryukova requested review from alexvanin 2024-11-26 10:34:28 +00:00
mbiryukova requested review from dkirillov 2024-11-26 10:34:28 +00:00
mbiryukova force-pushed bugfix/precondition_headers from 04177c9936 to c526f7e33f 2024-11-26 10:34:55 +00:00 Compare
mbiryukova changed title from [#xxx] Ignore precondition headers with invalid date format to [#563] Ignore precondition headers with invalid date format 2024-11-26 10:35:20 +00:00
mbiryukova requested review from pogpp 2024-11-26 10:44:24 +00:00
mbiryukova requested review from r.loginov 2024-11-26 10:44:24 +00:00
mbiryukova requested review from nzinkevich 2024-11-26 10:44:24 +00:00
dkirillov reviewed 2024-11-26 11:25:52 +00:00
@ -138,13 +138,12 @@ func (h *handler) PatchObjectHandler(w http.ResponseWriter, r *http.Request) {
}
func parsePatchConditionalHeaders(headers http.Header) (*conditionalArgs, error) {
Member

We don't need to return error now

We don't need to return error now
dkirillov marked this conversation as resolved
dkirillov reviewed 2024-11-26 11:26:02 +00:00
@ -291,17 +291,16 @@ func checkPreconditions(info *data.ObjectInfo, args *conditionalArgs, md5Enabled
}
func parseConditionalHeaders(headers http.Header) (*conditionalArgs, error) {
Member

We don't need to return error now

We don't need to return error now
dkirillov marked this conversation as resolved
mbiryukova force-pushed bugfix/precondition_headers from c526f7e33f to 1b8127abdb 2024-11-26 11:35:44 +00:00 Compare
dkirillov approved these changes 2024-11-26 12:48:54 +00:00
Dismissed
@ -300,2 +295,2 @@
if args.IfModifiedSince, err = parseHTTPTime(headers.Get(api.IfModifiedSince)); err != nil {
return nil, err
if httpTime, err := parseHTTPTime(headers.Get(api.IfModifiedSince)); err == nil {
args.IfModifiedSince = httpTime
Member

Should we log the case when we couldn't parse time? It would be nice to see I suppose

Should we log the case when we couldn't parse time? It would be nice to see I suppose
alexvanin approved these changes 2024-11-27 08:26:08 +00:00
Dismissed
alexvanin added this to the v0.31.1 milestone 2024-11-27 08:26:29 +00:00
mbiryukova force-pushed bugfix/precondition_headers from 1b8127abdb to e3141fc8e3 2024-11-27 09:07:38 +00:00 Compare
mbiryukova dismissed dkirillov's review 2024-11-27 09:07:38 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

mbiryukova dismissed alexvanin's review 2024-11-27 09:07:38 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

mbiryukova requested review from alexvanin 2024-11-27 09:10:50 +00:00
alexvanin approved these changes 2024-11-27 15:04:21 +00:00
r.loginov approved these changes 2024-11-28 02:41:46 +00:00
alexvanin merged commit e3141fc8e3 into master 2024-11-28 06:06:25 +00:00
alexvanin deleted branch bugfix/precondition_headers 2024-11-28 06:06:26 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-s3-gw#563
No description provided.