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