* restore any ssl_hostname for this connection set earlier by
* ap_proxy_determine_connection().
*/
- const char *ssl_hostname = conn->ssl_hostname;
+ char ssl_hostname[PROXY_WORKER_MAX_HOSTNAME_SIZE];
+ if (!conn->ssl_hostname || PROXY_STRNCPY(ssl_hostname,
+ conn->ssl_hostname)) {
+ ssl_hostname[0] = '\0';
+ }
socket_cleanup(conn);
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00951)
"%s: backend socket is disconnected.",
proxy_function);
- conn->ssl_hostname = apr_pstrdup(conn->scpool, ssl_hostname);
+ if (ssl_hostname[0]) {
+ conn->ssl_hostname = apr_pstrdup(conn->scpool, ssl_hostname);
+ }
}
}
while ((backend_addr || conn->uds_path) && !connected) {