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

fix: PATCH requests on /api/v1 not working #3600

Merged
merged 2 commits into from
Jun 21, 2024

Conversation

mudkipme
Copy link
Contributor

Because of soheilhy/cmux#99, PATCH requests can't be handled by Memos v1 API (0.22+). Thankfully, cmux has a parameter to add supported HTTP methods for cmux.HTTP1Fast.

With some user agents and reverse proxy servers, this issue can't be reproduced because the PATCH request reused previous HTTP connections which were used by GET or POST requests, and didn't go through the match process of cmux.

This patch (pun intended) also fixes #3494, mudkipme/MoeMemosAndroid#187 and mudkipme/MoeMemos#189.

server/server.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@boojack boojack left a comment

Choose a reason for hiding this comment

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

LGTM

@boojack boojack merged commit e33244e into usememos:main Jun 21, 2024
2 checks passed
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.

Failed to set up resources
2 participants