summaryrefslogtreecommitdiffstats
path: root/modules/arch
diff options
context:
space:
mode:
authorBradley Nicholes <bnicholes@apache.org>2003-06-02 17:24:30 +0200
committerBradley Nicholes <bnicholes@apache.org>2003-06-02 17:24:30 +0200
commit242ebeb98a05ff8e032105a2f875b807f6b61757 (patch)
tree9d69cbc07aeb156699e992a3b8c7d7bee42be842 /modules/arch
parent The right patch (thanks to Eric for identifying the wrong patch) to move (diff)
downloadapache2-242ebeb98a05ff8e032105a2f875b807f6b61757.tar.xz
apache2-242ebeb98a05ff8e032105a2f875b807f6b61757.zip
Allow for an unclean shutdown of SSL ports to avoid timeout conditions
between the client and the server. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100138 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/arch')
-rw-r--r--modules/arch/netware/mod_nw_ssl.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/modules/arch/netware/mod_nw_ssl.c b/modules/arch/netware/mod_nw_ssl.c
index a931cf8f33..84cfc76c0c 100644
--- a/modules/arch/netware/mod_nw_ssl.c
+++ b/modules/arch/netware/mod_nw_ssl.c
@@ -89,6 +89,10 @@
#include "apr_portable.h"
#include "apr_optional.h"
+#ifndef SO_TLS_UNCLEAN_SHUTDOWN
+#define SO_TLS_UNCLEAN_SHUTDOWN 0
+#endif
+
APR_DECLARE_OPTIONAL_FN(int, ssl_proxy_enable, (conn_rec *));
APR_DECLARE_OPTIONAL_FN(int, ssl_engine_disable, (conn_rec *));
@@ -266,7 +270,7 @@ static int make_secure_socket(apr_pool_t *pconf, const struct sockaddr_in *serve
}
if (mutual) {
- optParam = 0x07; // SO_SSL_AUTH_CLIENT
+ optParam = 0x07; // SO_SSL_AUTH_CLIENT
if(WSAIoctl(s, SO_SSL_SET_FLAGS, (char*)&optParam,
sizeof(optParam), NULL, 0, NULL, NULL, NULL)) {
@@ -277,6 +281,10 @@ static int make_secure_socket(apr_pool_t *pconf, const struct sockaddr_in *serve
}
}
+ optParam = SO_TLS_UNCLEAN_SHUTDOWN;
+ WSAIoctl(s, SO_SSL_SET_FLAGS, (char *)&optParam, sizeof(optParam),
+ NULL, 0, NULL, NULL, NULL);
+
return s;
}
@@ -307,6 +315,10 @@ int convert_secure_socket(conn_rec *c, apr_socket_t *csd)
return rcode;
}
+ ulFlags = SO_TLS_UNCLEAN_SHUTDOWN;
+ WSAIoctl(sock, SO_TLS_SET_FLAGS, &ulFlags, sizeof(unsigned long),
+ NULL, 0, NULL, NULL, NULL);
+
/* setup the socket for SSL */
memset (&sWS2Opts, 0, sizeof(sWS2Opts));
memset (&sNWTLSOpts, 0, sizeof(sNWTLSOpts));
@@ -526,12 +538,13 @@ static int isSecure (const request_rec *r)
static int nwssl_hook_Fixup(request_rec *r)
{
- apr_table_t *e = r->subprocess_env;
+ int i;
+
if (!isSecure(r))
return DECLINED;
- apr_table_set(e, "HTTPS", "on");
-
+ apr_table_set(r->subprocess_env, "HTTPS", "on");
+
return DECLINED;
}