httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eugene Teslenko <eugene.tesle...@gmail.com>
Subject Share data between apache modules
Date Sat, 09 May 2015 16:40:54 GMT
Hi!

I'm trying to pass data from one module to another within a single request.
But after the first module writes data into r->notes table, the second one
reads only (null) from it.
Example.

mod_a (in the handler function):
apr_table_setn(r->notes, "test-var", "test-string");
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "mod_a: r->notes[test-var]=%s",
(char *)apr_table_get(r->notes,"test-var"));

mod_b (in the log_transaction function):
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "mod_b: r->notes[test-var]=%s",
(char *)apr_table_get(r->notes,"test-var"));

And I got the following lines in the log:
mod_a: r->notes[test-var]=test-string
mod_b: r->notes[test-var]=(null)

Is there any way to pass it?

Thanks!

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message