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

Return first content-type when no Accept header is set #351

Merged
merged 1 commit into from
Dec 20, 2021

Conversation

tsmethurst
Copy link
Contributor

This PR relaxes the content-negotiation function in the API package, ensuring that something will be returned to a caller even if they have no content-type set in their Accept header.

This is achieved by returning the first content-type on offer when no Accept header is set.

This works around an issue where Tusky doesn't present Accept headers when making API requests.

@tsmethurst tsmethurst merged commit 2582515 into main Dec 20, 2021
@tsmethurst tsmethurst deleted the relax_accept_headers branch December 20, 2021 10:08
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.

1 participant