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

Maintain methods across redirects #629

Merged
merged 1 commit into from
Dec 10, 2021
Merged

Conversation

ikravets
Copy link

I've originally stumbled upon this issue after upgrading Gitlab server
from HTTP-only to HTTPS, but forgetting to update some scripts
which use gitlab cli. The cli behaved like everything is fine, but a
server has effectively become "read-only". I guess, I may be not the
only one bitten by this issue, so I've fixed it for everyone.

Citing the commit message:

If HTTPS is enabled on a server, but the client uses plain HTTP
Gitlab generates HTTP 301 redirect. By default HTTParty will
follow with GET request regardless of the original method and
any PUT/POST will silently fail to update the target. Fix by
enabling HTTParty::maintain_method_across_redirects.

If HTTPS is enabled on a server, but the client uses plain HTTP
Gitlab generates HTTP 301 redirect. By default HTTParty will
follow with GET request regardless of the original method and
any PUT/POST will silently fail to update the target. Fix by
enabling HTTParty::maintain_method_across_redirects.
@NARKOZ NARKOZ merged commit 25f6f76 into NARKOZ:master Dec 10, 2021
@NARKOZ
Copy link
Owner

NARKOZ commented Dec 10, 2021

Thank you ❤️

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