Add connection keep alive headers and fix wrong rewrapping.
Merge remote-tracking branch 'origin/master'