Replace only the protocol part of the URL in Socket#connect.
Handle secure versions of protocols in DefaultSocket when changing URLs.
Merge pull request #82 from bartfaitamas/socket-protocol-replace

Replace only the protocol part of the URL in Socket#connect.