mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-26 12:14:56 +00:00
Fix localhost resolution
This commit is contained in:
1 parent
c75eb24eb8
commit
e0a1feafe0
5 files changed
+6
-4
No files matched your search
@@ -43,7 +43,7 @@ char *mg_ntoa(const struct mg_addr *addr, char *buf, size_t len) {
|
||||
}
|
||||
|
||||
static bool mg_atonl(struct mg_str str, struct mg_addr *addr) {
|
||||
if (mg_casecmp(str.ptr, "localhost") != 0) return false;
|
||||
if (mg_vcasecmp(&str, "localhost") != 0) return false;
|
||||
addr->ip = mg_htonl(0x7f000001);
|
||||
addr->is_ip6 = false;
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user