Code Monkey home page Code Monkey logo

Comments (8)

shazow avatar shazow commented on July 22, 2024

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.

shazow avatar shazow commented on July 22, 2024

Double bonus points for a failing unit test.

from urllib3.

piotr-dobrogost avatar piotr-dobrogost commented on July 22, 2024

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.

kennethreitz avatar kennethreitz commented on July 22, 2024

Requests will always do its own redirection handling. Urllib3 dependence is intended to be as loosely coupled as possible.

from urllib3.

piotr-dobrogost avatar piotr-dobrogost commented on July 22, 2024

Ok, thanks for info.

from urllib3.

kennethreitz avatar kennethreitz commented on July 22, 2024

...

from urllib3.

shazow avatar shazow commented on July 22, 2024

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.

shazow avatar shazow commented on July 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.