diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2021-04-23 11:16:50 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2021-04-23 11:16:50 +0000 |
commit | 59ea885da07c0916fb5917efb5538df2ecec1553 (patch) | |
tree | 7788717c19054ae6300f222374c1179e00bf9c8d /local.c | |
parent | Update ChangeLog (diff) | |
download | w3m-59ea885da07c0916fb5917efb5538df2ecec1553.tar.gz w3m-59ea885da07c0916fb5917efb5538df2ecec1553.zip |
Treat 127.0.0.1, [::1], and hostname as localhost
Diffstat (limited to '')
-rw-r--r-- | local.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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; } |