enable -version=without_openssl for now

This commit is contained in:
Adam D. Ruppe 2017-10-16 14:59:49 -04:00
parent 0c0d4fe0c9
commit 189ef8f047
1 changed files with 8 additions and 2 deletions

10
http2.d
View File

@ -453,9 +453,12 @@ class HttpRequest {
Socket getOpenSocketOnHost(string host, ushort port, bool ssl) {
Socket openNewConnection() {
Socket socket;
if(ssl)
if(ssl) {
version(with_openssl)
socket = new SslClientSocket(AddressFamily.INET, SocketType.STREAM);
else
else
throw new Exception("SSL not compiled in");
} else
socket = new Socket(AddressFamily.INET, SocketType.STREAM);
socket.connect(new InternetAddress(host, port));
@ -600,6 +603,7 @@ class HttpRequest {
if(request.onDataReceived)
request.onDataReceived(request);
version(with_openssl)
if(auto s = cast(SslClientSocket) sock) {
// select doesn't handle the case with stuff
// left in the ssl buffer so i'm checking it separately
@ -1237,6 +1241,8 @@ void main() {
// From sslsocket.d
version(without_openssl) {}
else
version=use_openssl;
version(use_openssl) {