diff options
-rw-r--r-- | include/HttpServ.h | 4 | ||||
-rw-r--r-- | lib/HttpServ.cc | 6 | ||||
-rw-r--r-- | lib/LuaHttp.cc | 18 |
3 files changed, 25 insertions, 3 deletions
diff --git a/include/HttpServ.h b/include/HttpServ.h index 53a6d89..bcff606 100644 --- a/include/HttpServ.h +++ b/include/HttpServ.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: HttpServ.h,v 1.23 2007-06-11 11:29:06 pixel Exp $ */ +/* $Id: HttpServ.h,v 1.24 2007-06-17 15:21:51 pixel Exp $ */ #ifndef __HTTPSERV_H__ #define __HTTPSERV_H__ @@ -67,6 +67,8 @@ class HttpRequest : public Base { public: Variables * vars, * headers; String uri, login, password; + Uint32 lip, dip; + int lport, dport; }; class Action; diff --git a/lib/HttpServ.cc b/lib/HttpServ.cc index e24a49d..bc836c4 100644 --- a/lib/HttpServ.cc +++ b/lib/HttpServ.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: HttpServ.cc,v 1.50 2007-06-13 07:01:28 pixel Exp $ */ +/* $Id: HttpServ.cc,v 1.51 2007-06-17 15:21:50 pixel Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -227,6 +227,10 @@ int ProcessRequest::Do() throw(GeneralException) { request.uri = Uri; request.login = login; request.password = password; + request.lip = s.GetAddr(); + request.dip = s.GetDistantAddr(); + request.lport = s.GetPort(); + request.dport = s.GetDistantPort(); d->Do(request, &response); a = response.BuildResponse(&s); } else { diff --git a/lib/LuaHttp.cc b/lib/LuaHttp.cc index d3cbd2a..736739e 100644 --- a/lib/LuaHttp.cc +++ b/lib/LuaHttp.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: LuaHttp.cc,v 1.15 2007-06-11 21:24:48 pixel Exp $ */ +/* $Id: LuaHttp.cc,v 1.16 2007-06-17 15:21:50 pixel Exp $ */ #include "md5.h" #include "Domain.h" @@ -348,6 +348,22 @@ class LuaDomain : public Domain { L->push("password"); L->push(req.password); L->settable(); + + L->push("lip"); + L->push((lua_Number) req.lip); + L->settable(); + + L->push("dip"); + L->push((lua_Number) req.dip); + L->settable(); + + L->push("lport"); + L->push((lua_Number) req.lport); + L->settable(); + + L->push("dport"); + L->push((lua_Number) req.dport); + L->settable(); LuaHttpResponse r(res); r.push(L); |