Treat 127.0.0.1, [::1], and hostname as localhost
This commit is contained in:
5
local.c
5
local.c
@@ -51,13 +51,10 @@ writeLocalCookie()
|
||||
Str
|
||||
localCookie()
|
||||
{
|
||||
char hostname[256];
|
||||
|
||||
if (Local_cookie)
|
||||
return Local_cookie;
|
||||
gethostname(hostname, 256);
|
||||
srand48((long)New(char) + (long)time(NULL));
|
||||
Local_cookie = Sprintf("%ld@%s", lrand48(), hostname);
|
||||
Local_cookie = Sprintf("%ld@%s", lrand48(), HostName ? HostName : "localhost");
|
||||
return Local_cookie;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user