You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2012/06/12 17:51:36 UTC

[8/50] git commit: don't bother passing the to and from URL

don't bother passing the to and from URL


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

Branch: refs/heads/jpeach/lua
Commit: 4ada42364d1551dbd7d198bf93833420453a32fb
Parents: 17132c9
Author: James Peach <jp...@apache.org>
Authored: Tue Apr 24 22:20:32 2012 -0700
Committer: James Peach <jp...@apache.org>
Committed: Tue Jun 12 08:48:38 2012 -0700

----------------------------------------------------------------------
 plugins/lua/lua.cc |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4ada4236/plugins/lua/lua.cc
----------------------------------------------------------------------
diff --git a/plugins/lua/lua.cc b/plugins/lua/lua.cc
index 5caa7f3..9a74571 100644
--- a/plugins/lua/lua.cc
+++ b/plugins/lua/lua.cc
@@ -97,18 +97,11 @@ LuaPluginRemap(lua_State * lua, TSHttpTxn txn, TSRemapRequestInfo * rri)
 
   TSDebug("lua", "handling request %p on thread 0x%llx", rri, (unsigned long long)pthread_self());
 
-  // XXX The 'to' and 'from' URLs are supposed to be static so we can cache them somewhere
-  // in the Lua state.
-  // XXX Do we really need to pass this at all? You can get the current URL from the request, so
-  // there's not really a need for these that I can see ...
-  LuaPushUrl(lua, rri->requestBufp, rri->mapFromUrl);
-  LuaPushUrl(lua, rri->requestBufp, rri->mapToUrl);
-
   // XXX We can also cache the RemapRequestInfo in the Lua state. We we just need to reset
   // the rri pointer and status.
   rq = LuaPushRemapRequestInfo(lua, txn, rri);
 
-  if (lua_pcall(lua, 3, 0, 0) != 0) {
+  if (lua_pcall(lua, 1, 0, 0) != 0) {
     TSDebug("lua", "remap failed: %s", lua_tostring(lua, -1));
     lua_pop(lua, 1);
     return TSREMAP_ERROR;