mirror of https://github.com/adamdruppe/arsd.git
enable -version=without_openssl for now
This commit is contained in:
parent
0c0d4fe0c9
commit
189ef8f047
10
http2.d
10
http2.d
|
@ -453,9 +453,12 @@ class HttpRequest {
|
||||||
Socket getOpenSocketOnHost(string host, ushort port, bool ssl) {
|
Socket getOpenSocketOnHost(string host, ushort port, bool ssl) {
|
||||||
Socket openNewConnection() {
|
Socket openNewConnection() {
|
||||||
Socket socket;
|
Socket socket;
|
||||||
if(ssl)
|
if(ssl) {
|
||||||
|
version(with_openssl)
|
||||||
socket = new SslClientSocket(AddressFamily.INET, SocketType.STREAM);
|
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 = new Socket(AddressFamily.INET, SocketType.STREAM);
|
||||||
|
|
||||||
socket.connect(new InternetAddress(host, port));
|
socket.connect(new InternetAddress(host, port));
|
||||||
|
@ -600,6 +603,7 @@ class HttpRequest {
|
||||||
if(request.onDataReceived)
|
if(request.onDataReceived)
|
||||||
request.onDataReceived(request);
|
request.onDataReceived(request);
|
||||||
|
|
||||||
|
version(with_openssl)
|
||||||
if(auto s = cast(SslClientSocket) sock) {
|
if(auto s = cast(SslClientSocket) sock) {
|
||||||
// select doesn't handle the case with stuff
|
// select doesn't handle the case with stuff
|
||||||
// left in the ssl buffer so i'm checking it separately
|
// left in the ssl buffer so i'm checking it separately
|
||||||
|
@ -1237,6 +1241,8 @@ void main() {
|
||||||
|
|
||||||
// From sslsocket.d
|
// From sslsocket.d
|
||||||
|
|
||||||
|
version(without_openssl) {}
|
||||||
|
else
|
||||||
version=use_openssl;
|
version=use_openssl;
|
||||||
|
|
||||||
version(use_openssl) {
|
version(use_openssl) {
|
||||||
|
|
Loading…
Reference in New Issue