httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject svn commit: r711666 - /httpd/mod_wombat/trunk/request.c
Date Wed, 05 Nov 2008 19:15:44 GMT
Author: brianm
Date: Wed Nov  5 11:15:43 2008
New Revision: 711666

URL: http://svn.apache.org/viewvc?rev=711666&view=rev
Log:
r:add_output_filter(..) is back

Modified:
    httpd/mod_wombat/trunk/request.c

Modified: httpd/mod_wombat/trunk/request.c
URL: http://svn.apache.org/viewvc/httpd/mod_wombat/trunk/request.c?rev=711666&r1=711665&r2=711666&view=diff
==============================================================================
--- httpd/mod_wombat/trunk/request.c (original)
+++ httpd/mod_wombat/trunk/request.c Wed Nov  5 11:15:43 2008
@@ -186,13 +186,13 @@
 }
 
 // r:addoutputfilter(name|function)
-// static int req_add_output_filter(lua_State *L) {
-//     request_rec* r = check_request_rec(L, 1);    
-//     const char *name = luaL_checkstring(L, 2);
-//     ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "adding output filter %s", name);
-//     ap_add_output_filter(name, L, r, r->connection);
-//     return 0;
-// }
+static int req_add_output_filter(lua_State *L) {
+    request_rec* r = check_request_rec(L, 1);    
+    const char *name = luaL_checkstring(L, 2);
+    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "adding output filter %s", name);
+    ap_add_output_filter(name, L, r, r->connection);
+    return 0;
+}
 
 static int req_document_root(lua_State* L) {
   request_rec* r = check_request_rec(L, 1);
@@ -436,7 +436,9 @@
     apr_hash_set(dispatch, "crit", APR_HASH_KEY_STRING, makefun(&req_crit, APW_REQ_FUNTYPE_LUACFUN,
p));
     apr_hash_set(dispatch, "alert", APR_HASH_KEY_STRING, makefun(&req_alert, APW_REQ_FUNTYPE_LUACFUN,
p));
     apr_hash_set(dispatch, "emerg", APR_HASH_KEY_STRING, makefun(&req_emerg, APW_REQ_FUNTYPE_LUACFUN,
p));
-    
+    // req_add_output_filter
+    apr_hash_set(dispatch, "add_output_filter", APR_HASH_KEY_STRING, makefun(&req_add_output_filter,

+                                                                             APW_REQ_FUNTYPE_LUACFUN,
p));
     
     // lua_pushinteger(L, r->status);
     // lua_setfield(L, -2, "status");



Mime
View raw message