Permalink
Browse files

Refcounted SSL stream goes out of scope - fixes #846

  • Loading branch information...
etcimon committed Oct 2, 2014
1 parent f504a6a commit 25855fd2376f19b4e7dbe9e658ec4e22298d7fab
Showing with 5 additions and 2 deletions.
  1. +5 −2 source/vibe/http/server.d
@@ -1202,6 +1202,11 @@ private void handleHTTPConnection(TCPConnection connection, HTTPServerListener l
{
Stream http_stream = connection;
version(VibeNoSSL) {} else {
import std.traits : ReturnType;
ReturnType!createSSLStreamFL ssl_stream;
}
if (!connection.waitForData(10.seconds())) {
logDebug("Client didn't send the initial request in a timely manner. Closing connection.");
return;
@@ -1211,8 +1216,6 @@ private void handleHTTPConnection(TCPConnection connection, HTTPServerListener l
if (listen_info.sslContext) {
version (VibeNoSSL) assert(false, "No SSL support compiled in (VibeNoSSL)");
else {
import std.traits : ReturnType;
ReturnType!createSSLStreamFL ssl_stream;
logTrace("accept ssl");
// TODO: reverse DNS lookup for peer_name of the incoming connection for SSL client certificate verification purposes
ssl_stream = createSSLStreamFL(http_stream, listen_info.sslContext, SSLStreamState.accepting, null, connection.remoteAddress);

0 comments on commit 25855fd

Please sign in to comment.