Return empty rawIspInfo when no ISP info is obtained
This commit is contained in:
parent
79b4c54770
commit
73318e153b
|
@ -179,6 +179,9 @@ func getIP(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ret.ProcessedString += " - " + isp
|
ret.ProcessedString += " - " + isp
|
||||||
|
} else {
|
||||||
|
// return an empty JSON object to avoid parse errors
|
||||||
|
ret.RawISPInfo = "{}"
|
||||||
}
|
}
|
||||||
|
|
||||||
render.JSON(w, r, ret)
|
render.JSON(w, r, ret)
|
||||||
|
|
Loading…
Reference in a new issue