-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bucket notifications - wrong etag, size #8819
Conversation
97fedeb
to
cd245f9
Compare
cd245f9
to
fdf4617
Compare
@@ -65,6 +65,8 @@ async function put_object(req, res) { | |||
} | |||
s3_utils.set_encryption_response_headers(req, res, reply.encryption); | |||
|
|||
res.size_for_notif = size || reply.size; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Under which circumstances the size would be 0 and reply.size would be non zero?
The opposite is possible but if we have called putobject to upload some data then "size"sould be there if not then reply.size should also be zero.
It is possible that the call to upload was not successful so reply.size might be less than size or zero.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
size is zero (and reply.size is not zero) when copy_source is true (see lines 21 and 29).
@@ -422,7 +422,7 @@ function compose_notification_req(req, res, bucket, notif_conf) { | |||
let eTag = res.getHeader('ETag'); | |||
//eslint-disable-next-line | |||
if (eTag && eTag.startsWith('\"') && eTag.endsWith('\"')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It starts with '\"' ? shouldn't it be '"\' ? For example: "\test-etag\"
Please keep one example in comment to avoid confusion for code reader.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only option currently for quotation is with double quote marks, "".
That is the only test performed in 424.
I have not seen an etag quoted with single quotes '' yet, so I didn't test for it.
fdf4617
to
8ef4e41
Compare
Signed-off-by: Amit Prinz Setter <[email protected]>
8ef4e41
to
e9221ef
Compare
Signed-off-by: Amit Prinz Setter <[email protected]>
Explain the changes
Issues: Fixed #xxx / Gap #xxx
Testing Instructions: