Patches for check_http cookies and keep-alive support [sf#778644] [#222]