diff options
| author | Rutger Broekhoff | 2026-02-20 19:04:13 +0100 |
|---|---|---|
| committer | Rutger Broekhoff | 2026-02-20 19:04:20 +0100 |
| commit | fd69069e3143d895a51c0621a134b334fc24b762 (patch) | |
| tree | 01bd5f3f96574d6b5543c26f1b9820034cc364c0 /gitolfs3-server/src/handler.rs | |
| parent | a208bdb9d6db274afaebf8c1676ee8792b9ed7d4 (diff) | |
| download | gitolfs3-fd69069e3143d895a51c0621a134b334fc24b762.tar.gz gitolfs3-fd69069e3143d895a51c0621a134b334fc24b762.zip | |
Diffstat (limited to 'gitolfs3-server/src/handler.rs')
| -rw-r--r-- | gitolfs3-server/src/handler.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gitolfs3-server/src/handler.rs b/gitolfs3-server/src/handler.rs index ee52a31..1f47c9e 100644 --- a/gitolfs3-server/src/handler.rs +++ b/gitolfs3-server/src/handler.rs | |||
| @@ -88,7 +88,7 @@ async fn handle_download_object( | |||
| 88 | trusted: bool, | 88 | trusted: bool, |
| 89 | ) -> BatchResponseObject { | 89 | ) -> BatchResponseObject { |
| 90 | let (oid0, oid1) = (HexByte(obj.oid[0]), HexByte(obj.oid[1])); | 90 | let (oid0, oid1) = (HexByte(obj.oid[0]), HexByte(obj.oid[1])); |
| 91 | let full_path = format!("{repo}/lfs/objects/{}/{}/{}", oid0, oid1, obj.oid); | 91 | let full_path = format!("{repo}/lfs/objects/{oid0}/{oid1}/{}", obj.oid); |
| 92 | 92 | ||
| 93 | let content_length = match state.check_object(repo, obj).await { | 93 | let content_length = match state.check_object(repo, obj).await { |
| 94 | Ok(ObjectStatus::ExistsOk { content_length }) => content_length, | 94 | Ok(ObjectStatus::ExistsOk { content_length }) => content_length, |
| @@ -267,7 +267,7 @@ pub async fn handle_obj_download( | |||
| 267 | return e.into_response(); | 267 | return e.into_response(); |
| 268 | } | 268 | } |
| 269 | 269 | ||
| 270 | let full_path = format!("{repo}/lfs/objects/{}/{}/{}", oid0, oid1, oid); | 270 | let full_path = format!("{repo}/lfs/objects/{oid0}/{oid1}/{oid}"); |
| 271 | let result = match state | 271 | let result = match state |
| 272 | .s3_client | 272 | .s3_client |
| 273 | .get_object() | 273 | .get_object() |
| @@ -285,7 +285,7 @@ pub async fn handle_obj_download( | |||
| 285 | "Failed to query object information", | 285 | "Failed to query object information", |
| 286 | ) | 286 | ) |
| 287 | .into_response(); | 287 | .into_response(); |
| 288 | }, | 288 | } |
| 289 | Err(e) => { | 289 | Err(e) => { |
| 290 | println!("Failed to GetObject (repo {repo}, OID {oid}): {e}"); | 290 | println!("Failed to GetObject (repo {repo}, OID {oid}): {e}"); |
| 291 | return ( | 291 | return ( |
| @@ -324,7 +324,7 @@ async fn handle_upload_object( | |||
| 324 | obj: &BatchRequestObject, | 324 | obj: &BatchRequestObject, |
| 325 | ) -> Option<BatchResponseObject> { | 325 | ) -> Option<BatchResponseObject> { |
| 326 | let (oid0, oid1) = (HexByte(obj.oid[0]), HexByte(obj.oid[1])); | 326 | let (oid0, oid1) = (HexByte(obj.oid[0]), HexByte(obj.oid[1])); |
| 327 | let full_path = format!("{repo}/lfs/objects/{}/{}/{}", oid0, oid1, obj.oid); | 327 | let full_path = format!("{repo}/lfs/objects/{oid0}/{oid1}/{}", obj.oid); |
| 328 | 328 | ||
| 329 | match state.check_object(repo, obj).await { | 329 | match state.check_object(repo, obj).await { |
| 330 | Ok(ObjectStatus::ExistsOk { .. }) => { | 330 | Ok(ObjectStatus::ExistsOk { .. }) => { |