This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author geertj
Recipients alex, geertj, pitrou, vstinner
Date 2014-10-06.14:22:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1412605336.4.0.873243070179.issue22564@psf.upfronthosting.co.za>
In-reply-to
Content
> +.. attribute:: SSLSocket.server_hostname
> +
> +   A ``bytes`` instance (...)
>
> Ah, this is a mistake. It's actually always a str instance (on SSLObject as well).

It is indeed, I stand corrected. I was confused by the decode -> encode roundtrip that happens in _ssl.

However I think that in theory SSLSocket.server_hostname could be a bytes, if a bytes was passed into the constructor. _ssl parses this argument with the "et" format which means it will let a correctly encoded byte string through. Not sure if anybody is using this though.
History
Date User Action Args
2014-10-06 14:22:16geertjsetrecipients: + geertj, pitrou, vstinner, alex
2014-10-06 14:22:16geertjsetmessageid: <1412605336.4.0.873243070179.issue22564@psf.upfronthosting.co.za>
2014-10-06 14:22:16geertjlinkissue22564 messages
2014-10-06 14:22:16geertjcreate