Patches for check_http redirection fix [sf#1562572] [#706]