-
Notifications
You must be signed in to change notification settings - Fork 182
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
Follow 307/308 redirects #252
Conversation
Thank! I need to refresh my memory on why we disabled 307/308. I suspect it's because the spec requires us to resend any body, which in turn means buffer potentially a lot of data to be able to "replay", or break spec. |
Another option is to make this work most of the time by only worrying about GET/HEAD/DELETE requests. Then there's no body to worry about resending, and only PUT/POST will have to deal with 307 responses manually. |
Would love to get some eyes on this :) AFAIK there are a few ways forward:
While writing this up I realized I don't actually need this to be fixed on the ureq end to fix deadlinks/cargo-deadlinks#110, I can handle the 307/308 explicitly on my end. |
Hi, sorry for the delay in looking at this! I have been meaning to swap back into my head what the semantics of 307/308 are. I think this is the best option for a short term fix:
Are you interested in updating this PR to take this approach? |
Yes, definitely! I'll add that tomorrow. |
FYI, you're getting a test failure because we do something tricky to make our doctests not hit live websites. If you look at the hidden Why, then, do we use httpbin as an example URL? If someone copies and pastes the code, we'd like it to work on the real Internet too. |
@jsha thanks, that fixed it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to go ahead with this change. Thanks both for the work!
This is the simplest part of #187. I'm not sure what the expect-100 discussion was about, but maybe it can be fixed later?