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
S3 Compatibility
label 2021-11-19 19:19:09 +00:00
trinity-1686a added 1 commit 2021-11-19 19:19:10 +00:00
continuous-integration/drone/pr Build is passing Details
8c45ad8e38
map range-error to the right http error code
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
trinity-1686a added 1 commit 2021-11-27 10:42:38 +00:00
continuous-integration/drone/pr Build is failing Details
36e104b665
send content-range on invalid range error
trinity-1686a added 1 commit 2021-11-27 14:56:05 +00:00
continuous-integration/drone/pr Build is passing Details
8a43ede301
add range header on 416 on web request
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 issue 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 description provided.