aboutsummaryrefslogtreecommitdiffstats
path: root/rs/server
diff options
context:
space:
mode:
Diffstat (limited to 'rs/server')
-rw-r--r--rs/server/src/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/rs/server/src/main.rs b/rs/server/src/main.rs
index b8428cb..cbac138 100644
--- a/rs/server/src/main.rs
+++ b/rs/server/src/main.rs
@@ -344,10 +344,11 @@ where
344{ 344{
345 type Rejection = GitLfsJsonRejection; 345 type Rejection = GitLfsJsonRejection;
346 346
347 async fn from_request(req: Request, state: &S) -> Result<Self, Self::Rejection> { 347 async fn from_request(mut req: Request, state: &S) -> Result<Self, Self::Rejection> {
348 if !has_git_lfs_json_content_type(&req) { 348 if !has_git_lfs_json_content_type(&req) {
349 return Err(GitLfsJsonRejection::MissingGitLfsJsonContentType); 349 return Err(GitLfsJsonRejection::MissingGitLfsJsonContentType);
350 } 350 }
351 req.headers_mut().insert(header::CONTENT_TYPE, HeaderValue::from_static("application/json"));
351 Json::<T>::from_request(req, state) 352 Json::<T>::from_request(req, state)
352 .await 353 .await
353 .map(GitLfsJson) 354 .map(GitLfsJson)