trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject [15/50] git commit: Add LuaRemapUrl
Date Tue, 12 Jun 2012 15:51:36 GMT
Add LuaRemapUrl


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/9be96177
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/9be96177
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/9be96177

Branch: refs/heads/jpeach/lua
Commit: 9be9617783d4c921c835e4cb46a1792adb587ad6
Parents: ee6acba
Author: James Peach <jpeach@apache.org>
Authored: Tue Apr 17 22:16:42 2012 -0700
Committer: James Peach <jpeach@apache.org>
Committed: Tue Jun 12 08:48:37 2012 -0700

----------------------------------------------------------------------
 plugins/lua/lapi.cc |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9be96177/plugins/lua/lapi.cc
----------------------------------------------------------------------
diff --git a/plugins/lua/lapi.cc b/plugins/lua/lapi.cc
index 90eb64d..49f807d 100644
--- a/plugins/lua/lapi.cc
+++ b/plugins/lua/lapi.cc
@@ -196,11 +196,22 @@ LuaRemapReject(lua_State * lua)
   return 1;
 }
 
+static int
+LuaRemapUrl(lua_State * lua)
+{
+  LuaRemapRequest * rq;
+
+  rq = LuaRemapRequest::get(lua, 1);
+  LuaPushUrl(lua, rq->rri->requestBufp, rq->rri->requestUrl);
+  return 1;
+}
+
 static const luaL_Reg RRI[] =
 {
   { "redirect", LuaRemapRedirect },
   { "rewrite", LuaRemapRewrite },
   { "reject", LuaRemapReject },
+  { "url", LuaRemapUrl },
   { NULL, NULL}
 };
 


Mime
View raw message