Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow parameterized application/json content types #386

Merged
merged 1 commit into from Feb 5, 2022

Conversation

loosebazooka
Copy link
Member

Fixes a compatibility issue where content-type "application/json; charset=UTF-8" wasn't allowed.

@loosebazooka loosebazooka force-pushed the allow-parametered-content-type branch 2 times, most recently from 1decee0 to 41e153e Compare February 4, 2022 16:05
@bobcallaway
Copy link
Member

code looks fine, anyway we could add some unit testing around this?

@loosebazooka
Copy link
Member Author

lol, I was afraid and waiting for someone to ask that. I'll go restructure this.

pkg/api/ca.go Outdated
gotContentType, _, perr := mime.ParseMediaType(contentTypeHeader)
if perr != nil {
err := fmt.Errorf("could not parse Content-Type %q", contentTypeHeader)
handleFulcioAPIError(w, req, http.StatusUnsupportedMediaType, err, err.Error())
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like I missed a return here too

Signed-off-by: Appu Goundan <appu@google.com>
Copy link
Member

@bobcallaway bobcallaway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@dlorenc dlorenc merged commit 0c51e0a into sigstore:main Feb 5, 2022
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.

None yet

3 participants