un33k / node-ipware

Returns the real IP address of users in Node.js
MIT License
124 stars 17 forks source link

Occasionally throws #3

Closed diachedelic closed 9 years ago

diachedelic commented 9 years ago
Unhandled error: TypeError: Cannot call method 'toLowerCase' of undefined
   at Object._me.is_private_ip (/var/www/com03-crosscountry-api/node_modules/ipware/index.js:55:21)
   at Object._me.get_ip (/var/www/com03-crosscountry-api/node_modules/ipware/index.js:147:22)
   at ServerResponse.<anonymous> (/var/www/com03-crosscountry-api/route/entry-handler.js:17:28)
   at ServerResponse.emit (events.js:117:20)
   at ServerResponse.OutgoingMessage._finish (http.js:1021:8)
   at ServerResponse.OutgoingMessage.end (http.js:1004:10)
   at Stream.onend (stream.js:79:10)
   at Stream.emit (events.js:117:20)
   at Server.<anonymous> (/var/www/com03-crosscountry-api/server.js:12:5)
   at Server.emit (events.js:98:17)
   at HTTPParser.parser.onIncoming (http.js:2113:12)
   at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:122:23)
   at Socket.socket.ondata (http.js:1971:22)
   at TCP.onread (net.js:528:27)
diachedelic commented 9 years ago

Node v0.10.35

un33k commented 9 years ago

Version 0.0.5 should address the issue.