Skip to content

Conversation

@rcoup
Copy link
Contributor

@rcoup rcoup commented May 6, 2022

git-lfs uses the same constant value for the Content-Type and Accept request HTTP headers:

POST /objects/batch/
Accept: application/vnd.git-lfs+json; charset=utf-8
Content-Type: application/vnd.git-lfs+json; charset=utf-8
...

But charset isn't valid syntax for Accept. This change splits out the constant to fix this:

POST /objects/batch/
Accept: application/vnd.git-lfs+json
Content-Type: application/vnd.git-lfs+json; charset=utf-8
...

Previously we were using the same value for both the HTTP request
Content-Type header (which includes a charset), and the Accept header,
where charset is not part of the valid syntax. Split them out into
separate values.
@rcoup rcoup requested a review from a team as a code owner May 6, 2022 13:21
@chrisd8088
Copy link
Member

Hey, thanks for the patch and welcome to Git LFS! This seems correct and reasonable to me, so I'll merge it once the CI jobs turn green. Thanks again for the PR!

@chrisd8088 chrisd8088 merged commit 4bd61bf into git-lfs:main May 6, 2022
@rcoup rcoup deleted the rc-fix-accept-header branch May 6, 2022 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants