Alecz added the comment:
Actually, because of issue 18543, urlopen will not use the custom opener if one
was defined, instead, it will create a new opener with check_hostname = True.
So it is impossible to skip hostname checking without overriding the urlopen
method.
I don't understand why
R. David Murray added the comment:
This issue was about setting hostname checking to false when the cert was being
checked, and we rejected making that even possible in urlopen.
If there is an issue with not being able to use a custom opener, that would be
a different issue and you should
Alecz added the comment:
If this request was rejected shouldn't the Resolution be something such as
Rejected, Not a Bug, or Wont fix?
At the first glance, I believe it is very misleading to see this as fixed.
I even installed the latest version and was surprised to see that the fix did
not
Roundup Robot added the comment:
New changeset fc39b8f0348d by Senthil Kumaran in branch '3.3':
Issue #17483: 3.3 Branch - Remove unreachable code in urllib.request
http://hg.python.org/cpython/rev/fc39b8f0348d
--
___
Python tracker
Antoine Pitrou added the comment:
IMO, there's not much point backporting such a simple cleanup, so I'm simply
closing the issue.
--
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Senthil Kumaran added the comment:
I shall do it. Just for keeping it clean and it may help when future patches
can be merged across branches cleanly. There is no loss IMO.
--
___
Python tracker rep...@bugs.python.org
Senthil Kumaran added the comment:
Here is the final patch (17483.patch) for this support. I am including Ezio
David for their review comments before I check this in. Thanks!
--
nosy: +ezio.melotti, r.david.murray
Added file: http://bugs.python.org/file29644/17483.patch
Antoine Pitrou added the comment:
I'm sorry, I'm -1 on this. It simply doesn't make sense to check the
certificate but skip hostname checking.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17483
R. David Murray added the comment:
It may not make sense, but I've seen it supported in the wild, in a different
library. Of course, we *did* treat it as a bug in our code and fix it once we
realized that's what the library was doing (we were inadvertently passing it
None for the hostname,
Roundup Robot added the comment:
New changeset 4ed8a8e781c3 by Antoine Pitrou in branch 'default':
Issue #17483: remove unreachable code in urlopen().
http://hg.python.org/cpython/rev/4ed8a8e781c3
--
nosy: +python-dev
___
Python tracker
Senthil Kumaran added the comment:
Antoine - I approached it from idea that check_hostname as a setting is
allowed from HTTPSConnection (http/client.py) but it not controllable from
urllib. Is there a case where it is useful in HTTPSConnection, but it should
not be from urllib?
- Thanks for
Antoine Pitrou added the comment:
Antoine - I approached it from idea that check_hostname as a setting
is allowed from HTTPSConnection (http/client.py) but it not
controllable from urllib. Is there a case where it is useful in
HTTPSConnection, but it should not be from urllib?
Senthil Kumaran added the comment:
HTTPSConnection is lower-level, so it makes sense to allow more
deviations there. That's why HTTPSConnection also takes the context
directly.
That's okay of an explanation. HTTPSHandler in urllib module provides an option
to send the context and the
Senthil Kumaran added the comment:
Here is an approach to solve this. I think, going this way is safe. I shall
append with the tests and docs.
--
Added file: http://bugs.python.org/file29610/17483-v1-notests-nodocs.patch
___
Python tracker
Daniel Wozniak added the comment:
Yes, I was trying to add tests for the behavior. I'll try to make the titles
more meaningful in the future. Thanks.
--
title: In urlopen the check_hostname variable can never be False. - Can not
tell urlopen not to check the hostname for https
Changes by Senthil Kumaran sent...@uthcode.com:
--
assignee: - orsenthil
nosy: +orsenthil
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17483
___
16 matches
Mail list logo