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
10 changes: 9 additions & 1 deletion iis/mymodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
// IIS7 Server API header file
#include <Windows.h>
#include <sal.h>
#include <string.h>
#include <strsafe.h>
#include "httpserv.h"

Expand Down Expand Up @@ -104,7 +105,14 @@ char *GetIpAddr(apr_pool_t *pool, PSOCKADDR pAddr)
if (GetNameInfo(pAddr, addrSize, buf, NI_MAXHOST, nullptr, 0, NI_NUMERICHOST) != 0) {
return apr_pstrdup(pool, "");
}


if (pAddr->sa_family == AF_INET6) {
char *zone = strchr(buf, '%');
if (zone != nullptr) {
*zone = '\0';
}
}

return buf;
}

Expand Down
Loading