aboutsummaryrefslogtreecommitdiffstats
path: root/local.c
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2021-04-23 11:16:50 +0000
committerTatsuya Kinoshita <tats@debian.org>2021-04-23 11:16:50 +0000
commit59ea885da07c0916fb5917efb5538df2ecec1553 (patch)
tree7788717c19054ae6300f222374c1179e00bf9c8d /local.c
parentUpdate ChangeLog (diff)
downloadw3m-59ea885da07c0916fb5917efb5538df2ecec1553.tar.gz
w3m-59ea885da07c0916fb5917efb5538df2ecec1553.zip
Treat 127.0.0.1, [::1], and hostname as localhost
Diffstat (limited to '')
-rw-r--r--local.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/local.c b/local.c
index 56d589d..8cae710 100644
--- a/local.c
+++ b/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;
}