Commit fbdd423
committed
fix NXDOMAIN error in Docker Compose environments
Add fallback to /etc/hosts lookup when DNS resolution fails in
hackney_happy.erl. This fixes issue #764 where hostnames resolved
via /etc/hosts (common in Docker Compose) would fail with NXDOMAIN
when using inet_res:getbyname alone.
The hybrid approach tries DNS first (faster), then falls back to
inet:gethostbyname which checks /etc/hosts when DNS fails.1 parent e044cd5 commit fbdd423
1 file changed
+23
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
127 | 128 | | |
128 | | - | |
129 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
130 | 136 | | |
131 | | - | |
| 137 | + | |
132 | 138 | | |
133 | 139 | | |
134 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
135 | 155 | | |
136 | 156 | | |
137 | 157 | | |
| |||
0 commit comments