TLS Support

Added tls support and fixed and http response.