Re: Set-Cookie

2009-03-26 Thread Marco Spinetti
Thanks very much. So I have to use: apr_table_add(r->headers_out, "Set-Cookie", co); apr_table_add(r->headers_out, "Set-Cookie", co1); Best regards. Marco Rainer Jung ha scritto: On 26.03.2009 10:07, Marco Spinetti wrote: Ok, I have to use apr_table_add instead od

Set-Cookie

2009-03-26 Thread Marco Spinetti
I have a doubt about ho to set multiple cookies. I'm using apache 2.2 and in my module handler I'm trying to set two different cookies with: apr_table_set(r->headers_out, "Set-Cookie", co); apr_table_set(r->headers_out, "Set-Cookie", co1); It seems that the second instruction override the fir

Temporary pool

2008-04-22 Thread Marco Spinetti
I have a question/problem about the temporary pool of post config. In my module I have the directive: static void register_hooks(apr_pool_t *p) { ap_hook_post_config(initialize_mymodule, NULL, NULL, APR_HOOK_MIDDLE); } In the function initialize_mymodule() I need to allocate a tempora

Re: Functions run when configuration file is read

2008-04-09 Thread Marco Spinetti
You can solve your problem in this way: static int initialize_your_module(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) { void *data; const char *userdata_key = "unique_key_init"; apr_pool_userdata_get(&data, userdata_key, s->process->pool); if (!data) {

Re: Write to client directly

2008-02-26 Thread Marco Spinetti
What do you mean? Jarek Kucypera ha scritto: ... force connection close ...

Re: Write to client directly

2008-02-26 Thread Marco Spinetti
e..... Some ideas? Best regards Marco Spinetti ha scritto: I'd like to know if it's possibile to write directly to the client. Actually in my module handler (apache 2.2) I have: ap_set_content_type(r, "text/html"); ap_rwrite(bufptr, size, r); ap_rflush(r); where bufptr is

Write to client directly

2008-02-25 Thread Marco Spinetti
I'd like to know if it's possibile to write directly to the client. Actually in my module handler (apache 2.2) I have: ap_set_content_type(r, "text/html"); ap_rwrite(bufptr, size, r); ap_rflush(r); where bufptr is obtained by libxslt xsltSaveResultToString. Because it's possibile to write t

Pool child

2008-02-07 Thread Marco Spinetti
I have a question about the pool of the child r->pool. I'm using apache 2.2 with prefork and I set MaxRequestsPerChild 0 (so a child should never dies). When my handler starts, I alloc all my needed memory from r->pool. When the handler finishes, the memory allocated from r->pool is free or not?

static page by module

2007-09-04 Thread Marco Spinetti
I'm a bit confused how to serve a static page by a module. I'm using apache 2.2.4: in particular cases I'd like that my module replies with a static page (/www/static.html). Now in these cases my module replies with: apr_table_set(r->headers_out, "Location", sconf->html); apr_table_set(r->heade

Re: input filter ap_internal_redirect

2007-08-14 Thread Marco Spinetti
ew ha scritto: On Tue, 14 Aug 2007 12:44:55 +0200 Marco Spinetti <[EMAIL PROTECTED]> wrote: So I'd like that my input filters, if the incoming request is not ok, does an internal redirect to a static page, without calling my handler. Your input filter gets called when your han

input filter ap_internal_redirect

2007-08-14 Thread Marco Spinetti
I have a doubt about my input filter. I'm writing an input filter which should filter the requests to my handler. Only special types of requests should go to my handler. So I'd like that my input filters, if the incoming request is not ok, does an internal redirect to a static page, without call

Re: Strange segmentation fault

2007-07-31 Thread Marco Spinetti
Any news :'( ? Marco Marco Spinetti ha scritto: I tried what Nick advised yesterday. I register all my cleanup with apr_pool_cleanup_register: this is for xml documents and bufptr. So after the creation or parsing of xml documents: apr_pool_cleanup_register(r->pool, doc, l

Re: Strange segmentation fault

2007-07-31 Thread Marco Spinetti
ice] child pid 7307 exit signal Segmentation fault (11) I don't know why I have two times the prints of mod_transform (???) but the segmentation fault is after the end of mod_transform. So it seems that the error is in the mod_transform. What do you think? Best regards Marco Marco S

Re: Strange segmentation fault

2007-07-31 Thread Marco Spinetti
Ralf Mattes ha scritto: On Mon, 2007-07-30 at 18:49 +0200, [EMAIL PROTECTED] wrote: I found that a similar problem was this: http://mail-archives.apache.org/mod_mbox/httpd-modules-dev/200703.mbox/[EMAIL PROTECTED] Similar? In what way? Abusing libxml2 interna? Are you doing this? Iff

Reload configuration

2007-07-19 Thread Marco Spinetti
I have a problem with my apache 2.2 configuration. I'd like to stop some dynamic Ip from calling my module. These ips change during the day and they could be more than 1000. Now my module reads a list of these ip from shared memory and this list is updated asyncronous. The problem is that for eac

Re: using mod_deflate inside a module

2007-07-04 Thread Marco Spinetti
Kew ha scritto: On Wed, 04 Jul 2007 17:08:56 +0200 Marco Spinetti <[EMAIL PROTECTED]> wrote: There is something I can't understand. If you declare ap_add_output_filter("INFLATE", ctx, req, conn); how can I call the function to decompress a content an

Re: using mod_deflate inside a module

2007-07-04 Thread Marco Spinetti
. Am I missing something? Mike ha scritto: On 7/4/07, Marco Spinetti <[EMAIL PROTECTED]> wrote: So are you telling me that I should call deflate_in_filter (which is defined inside mod_defalte) inside my module and then go on with the uncompressed result? Could you give me some suggesti

Re: using mod_deflate inside a module

2007-07-03 Thread Marco Spinetti
So are you telling me that I should call deflate_in_filter (which is defined inside mod_defalte) inside my module and then go on with the uncompressed result? Could you give me some suggestion about how to do it? Best regards Mike ha scritto: On Tue, Jul 03, 2007 at 05:18:44PM +0200, Marco

using mod_deflate inside a module

2007-07-03 Thread Marco Spinetti
I have a question about how to use a part of mod_deflate in my module. Inside my module I connect to a external source sending it a dynamic query and it replies with a gzip content. I should take this content, decompress it and then I have to modify it. I'd like to know if inside my module I co