map range-error to the right http error code #157

Merged
lx merged 4 commits from trinity-1686a/garage:range-error into main 2021-11-29 10:52:42 +00:00

fix #140

fix #140
trinity-1686a added the
scope
s3-api
label 2021-11-19 19:19:09 +00:00
trinity-1686a added 1 commit 2021-11-19 19:19:10 +00:00
map range-error to the right http error code
All checks were successful
continuous-integration/drone/pr Build is passing
8c45ad8e38
lx requested changes 2021-11-22 11:00:53 +00:00
lx left a comment
Owner
There are other code paths that should reeturn 416 instead of 400: - <https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/main/src/api/s3_get.rs#L239> - <https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/main/src/api/s3_get.rs#L161> - maybe some more ?
trinity-1686a added 1 commit 2021-11-25 17:30:40 +00:00
remove dead code and handle mutli-range by sending whole file
All checks were successful
continuous-integration/drone/pr Build is passing
991279cd40
trinity-1686a added 1 commit 2021-11-27 10:42:38 +00:00
send content-range on invalid range error
Some checks failed
continuous-integration/drone/pr Build is failing
36e104b665
trinity-1686a added 1 commit 2021-11-27 14:56:05 +00:00
add range header on 416 on web request
All checks were successful
continuous-integration/drone/pr Build is passing
8a43ede301
trinity-1686a requested review from lx 2021-11-27 16:21:11 +00:00
lx approved these changes 2021-11-29 10:50:37 +00:00
lx left a comment
Owner

LGTM

LGTM
@ -71,1 +70,3 @@
.body(body)?;
.header("Content-Type", "application/xml");
if let Some(header_map) = http_error_builder.headers_mut() {
Owner

It's kind of confusing that there is an if but as I understand the codepath is always taken. Using .unwrap() on .headers_mut() would have seemed more logical.

It's kind of confusing that there is an `if` but as I understand the codepath is always taken. Using `.unwrap()` on `.headers_mut()` would have seemed more logical.
lx merged commit 7f26ed55cd into main 2021-11-29 10:52:42 +00:00
lx referenced this pull request from a commit 2021-11-29 10:52:43 +00:00
trinity-1686a deleted branch range-error 2021-11-29 10:57:59 +00:00
Sign in to join this conversation.
No reviewers
lx
No milestone
No project
No assignees
2 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: Deuxfleurs/garage#157
No description provided.