Fix getting real IP address of requester.
Fix crash issue if request's app name header is unknown.