Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mod_websocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ static const char *construct_request_origin(request_rec *r)
const char *hostname = r->hostname;
apr_port_t port = ap_get_server_port(r);

if (ap_strchr_c(hostname, ':')) {
if ((hostname!=NULL)&&(ap_strchr_c(hostname, ':'))) {
/* IPv6 hostnames need to be bracketed. */
hostname = apr_pstrcat(r->pool, "[", hostname, "]", NULL);
}
Expand Down