Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Why don't we send `strict` to urllib3? #1869

Closed
Lukasa opened this Issue Jan 17, 2014 · 12 comments

Comments

Projects
None yet
4 participants
Owner

Lukasa commented Jan 17, 2014

I was trawling the Python core bugtracker when I spotted this beauty. It looks like it should be impossible to hit this if strict is set to True, but we don't pass that parameter to urllib3. Is there a good design reason we don't do this? If there isn't, are we open to a PR that does set that argument?

Owner

sigmavirus24 commented Jan 18, 2014

If it doesn't cause issues, I don't see why not.

Contributor

jschneier commented Jan 31, 2014

strict was deprecated in Python3. With that the LineAndFileWrapper was removed because HTTP/1.x is assumed. The fact that the LineAndFileWrapper is created means that the proxy must be returning some malformed status line or is using HTTP/0.9. Or at least that sounds correct to me.

I might be a bit thick but what are people using to easily setup a proxy? I'd like to take a look at the raw response.

Owner

Lukasa commented Jan 31, 2014

@jschneier I'm not so worried about that particular issue: we've never hit it in Requests. I'm just wondering whether there's a good technical reason we shouldn't just limit ourselves to well-formed HTTP/1.1.

Contributor

jschneier commented Jan 31, 2014

I think printing an annoying deprecation warning on python3 is the only drawback if you only want to deal with HTTP/1.x

Owner

Lukasa commented Jan 31, 2014

Deprecation warnings don't print by default on 3.x I don't think. So it's not even that bad.

Owner

sigmavirus24 commented Jan 31, 2014

Let's do it unless @kennethreitz has an object to restricting the library to HTTP/1.1

Owner

kennethreitz commented Jan 31, 2014

I don't see how this is useful.

@sigmavirus24 sigmavirus24 added this to the 3.0.0 milestone Oct 5, 2014

Owner

kennethreitz commented Oct 14, 2014

I don't see how this is unuseful.

Owner

sigmavirus24 commented Oct 14, 2014

You baffle me

Owner

kennethreitz commented Oct 16, 2014

I suppose I'm now +0 (while before I was -0) :)

Owner

Lukasa commented Nov 7, 2014

Doing this would solve #2322.

Owner

Lukasa commented Nov 7, 2014

Alrighty, patch in #2323.

@sigmavirus24 sigmavirus24 added the Fixed label Nov 7, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment