Diff

plugins/mod_bosh.lua @ 4447:57d7362a9312

mod_bosh: Fixed use of a private HTTP request property.
author Waqas Hussain <waqas20@gmail.com>
date Fri, 09 Dec 2011 11:44:00 +0500
parent 4442:bc0a68cae236
child 4457:332a5d73e5b6
line wrap: on
line diff
--- a/plugins/mod_bosh.lua	Fri Dec 09 11:38:35 2011 +0500
+++ b/plugins/mod_bosh.lua	Fri Dec 09 11:44:00 2011 +0500
@@ -58,7 +58,7 @@
 local trusted_proxies = module:get_option_set("trusted_proxies", {"127.0.0.1"})._items;
 
 local function get_ip_from_request(request)
-	local ip = request.handler:ip();
+	local ip = request.conn:ip();
 	local forwarded_for = request.headers["x-forwarded-for"];
 	if forwarded_for then
 		forwarded_for = forwarded_for..", "..ip;