intelligent UA testing for TLS + add Location: header