fix test_connection_timeout test and 2.6 compatibility error in HTTPSConnection