httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <ylavic....@gmail.com>
Subject Re: Share data between apache modules
Date Sun, 10 May 2015 11:06:51 GMT
Hi Eugene,

this should work...
We need more of your code and/or logging to figure out what's going on.

Maybe could you also log r and r->notes (with format "%pp") to see if
the two modules really share the same request?

Regards,
Yann.

On Sat, May 9, 2015 at 6:40 PM, Eugene Teslenko
<eugene.teslenko@gmail.com> wrote:
> 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
View raw message