Comments (8)
Mmm good point, might have to move redirect logic into PoolManager. Good find.
I'll try to have a closer look at this when I have time. If you can think of a nice solution, a patch branch is welcome.
from urllib3.
Double bonus points for a failing unit test.
from urllib3.
Btw, I'm wondering if we could refactor redirect logic so that Requests could use it instead of doing its own... @kennethreitz what do you think?
from urllib3.
Requests will always do its own redirection handling. Urllib3 dependence is intended to be as loosely coupled as possible.
from urllib3.
Ok, thanks for info.
from urllib3.
...
from urllib3.
I considered factoring it out but it's currently only ~2 lines of code which didn't seem worth it.
urllib3's goal is to keep the code as simple and orthogonal as possible, whereas Requests tries to cater more towards convenience and a larger featureset.
I want to be conservative in how much logic we pull down from Requests into urllib3 by design, but if it comes to the point where through necessity and correctness urllib3 implements more of what Requests does, we'll re-evaluate then.
from urllib3.
I have a test demonstrating the problem, I'm going to meditate on the correct solution some more this week and hopefully write down the answer shortly after.
If anyone else wants to take a crack at this before then, let me know.
from urllib3.
Related Issues (20)
- All Retry backoff_factor to optionally start applying from first retry HOT 4
- Retry backoff_factor offset from second retry incorrectly computed HOT 2
- HTTPConnection.request chunked=False doesn't work properly HOT 8
- Need to exception for "SSLEOFError" on python 3.10, 3.11, 3.12 HOT 3
- After upgrading to 2.2.1: 'HTTPResponse' object has no attribute 'json' HOT 1
- Comment typo settimout settimeout HOT 1
- Dependency management issue HOT 2
- Fix test_redirecting_to_bad_url failure in Requests HOT 12
- NodeJS + pyodide support HOT 1
- Retry.respect_retry_after_header=False is not honored when retry is incremented HOT 1
- Unable to build the doc `Command sphinx-build -b html -W . _build/html failed with exit code 2` HOT 1
- Sunsetting official support for Python 2
- Change log for version 1.26.19
- publish.yml uses two different versions of actions/download-artifact HOT 1
- requests > 2.31 - TypeError: unhashable type: 'list'
- pyproject.toml specifies an illegal value in the "dynamic" field HOT 4
- Cannot pass host parameter to PoolManager
- v2.0.5 is tagged strangely HOT 1
- Add support for HTTP/2 chunked request bodies HOT 1
- why this happens ?? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from urllib3.