Backport HTTP CONNECT bugfix for py26

http://bugs.python.org/issue13684