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

Make redirect history available #731

Open
RossLote opened this issue Feb 16, 2024 · 3 comments
Open

Make redirect history available #731

RossLote opened this issue Feb 16, 2024 · 3 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@RossLote
Copy link

I've been getting some strange redirect behaviour and I'd like a way to find out whet is happening. For the URL I'm fetching I've been getting a TooManyRedirects, message: Some("reached max redirects (5)") error.

I fetched the same URL using the python requests library and I only got 1 redirect so I think there may be a problem. I'm actually in charge of the entire stack and can assure you that there is only 1 redirect in the entire request cycle.

I've managed to get around it by setting the redirect limit to 6 but because I have no visibility of the history I can't find out what is going on.

Is there a reason the history is private?

@RossLote
Copy link
Author

Did anyone see this?

@algesten
Copy link
Owner

I don't really have an answer to why the history is private more than the smaller the API the less headache to maintain ureq.

@algesten algesten changed the title Redirect history not available Make redirect history available Nov 26, 2024
@algesten algesten added help wanted Extra attention is needed good first issue Good for newcomers labels Nov 26, 2024
@algesten
Copy link
Owner

I welcome help on this for ureq 3.x.

  • A new config option that is false by default.
  • Collect each redirect location into a Vec
  • Make Vec available through ResponseExt trait.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants