mirror of
https://github.com/rfc1036/whois.git
synced 2026-05-03 06:51:09 +00:00
Do not add again the /e argument to Japanese queries
The /e argument should not be added if it has already been provided by the user. Closes: #1050171
This commit is contained in:
parent
adb4af2ddc
commit
23302dbd1d
8
whois.c
8
whois.c
@ -742,8 +742,12 @@ char *queryformat(const char *server, const char *flags, const char *query)
|
||||
|
||||
/* ask for english text */
|
||||
if (!isripe && (streq(server, "whois.nic.ad.jp") ||
|
||||
streq(server, "whois.jprs.jp")) && japanese_locale())
|
||||
strcat(buf, "/e");
|
||||
streq(server, "whois.jprs.jp")) && japanese_locale()) {
|
||||
/* but not if the user already added the /e flag */
|
||||
char *flag = buf + strlen(buf) - 2;
|
||||
if (!streq(flag, "/e"))
|
||||
strcat(buf, "/e");
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user