'port' should be optional arg to VerifiedHTTPSConnection

Bug #1102944 reported by Stuart McLaren on 2013-01-22
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Stuart McLaren

Bug Description

VerifiedHTTPSConnection inherits from httplib.HTTPSConnection.

HTTPSConnection doesn't require that a port is supplied:

    class HTTPSConnection(HTTPConnection):
        "This class allows communication via SSL."

        default_port = HTTPS_PORT

        def __init__(self, host, port=None, key_file=None, cert_file=None,
                     strict=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT,

if port isn't present it attempts to parse the port value from host (eg localhost:8443)
or else defaults to 443.

We should match this, and have port be an optional parameter.

Fix proposed to branch: master
Review: https://review.openstack.org/20224

Changed in python-glanceclient:
status: New → In Progress

Reviewed: https://review.openstack.org/20224
Committed: http://github.com/openstack/python-glanceclient/commit/8d0d4b90f3c177d40a884fc562c51764cf5045f5
Submitter: Jenkins
Branch: master

commit 8d0d4b90f3c177d40a884fc562c51764cf5045f5
Author: Stuart McLaren <email address hidden>
Date: Tue Jan 22 11:42:42 2013 +0000

    Change https port to be an optional parameter

    VerifiedHTTPSConnection inherits from HTTPSConnection so 'port' should be
    an optional argument. If not present it will be set by HTTPSConnection
    in the usual way: by parsing the host string (eg 'localhost:8443')
    or setting to the default of '443'.

    Addresses bug 1102944.

    Change-Id: I2c2cb92f824acf15b0ff54590b5614cf206b57e0

Changed in python-glanceclient:
status: In Progress → Fix Committed
Brian Waldon (bcwaldon) on 2013-02-21
Changed in python-glanceclient:
importance: Undecided → Low
Brian Waldon (bcwaldon) on 2013-02-21
Changed in python-glanceclient:
milestone: none → v0.8.0
Brian Waldon (bcwaldon) on 2013-02-21
Changed in python-glanceclient:
assignee: nobody → Stuart McLaren (stuart-mclaren)
Brian Waldon (bcwaldon) on 2013-02-21
Changed in python-glanceclient:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers