telize

High performance JSON IP and GeoIP REST API (IP Geolocation)
Log | Files | Refs | README | LICENSE

commit 8711381da7c98ac932a704fedab2b32360008f04
parent c08875a412cfd76776e084795822678d24d1dfd7
Author: Frederic Cambus <fcambus@users.sourceforge.net>
Date:   Tue, 13 Jan 2015 21:33:26 +0100

Merge pull request #9 from lrobinot/patch-1

Fix region and isp name encoding
Diffstat:
Mtelize | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/telize b/telize @@ -120,6 +120,16 @@ server { args.city = cd:iconv(args.city) end + -- Convert region name to UTF-8 if it exists + if args.region ~= nil then + args.region = cd:iconv(args.region) + end + + -- Convert isp name to UTF-8 if it exists + if args.isp ~= nil then + args.isp = cd:iconv(args.isp) + end + if args.ip == "127.0.0.1" then ngx.status = ngx.HTTP_BAD_REQUEST ngx.say(cjson.encode({code = 401, message = "Input string is not a valid IP address"}))