Re: Disconnect database connection after idle timeout

2014-11-12 Thread Paul Silevitch
I don't fully understand your need here. I'm going to give my best. You could set an alarm in the cleanup handler that calls the disconnect after a specified amount of time. If a new request comes in, you could cancel the alarm in a postreadrequest handler (or something early in the cycle). To

Disconnect database connection after idle timeout

2014-11-12 Thread Xinhuan Zheng
Hello, I am having a database connection management question. Our apache+mod_perl application initiates a database connection request when it needs to then do data processing. Afterwards, if there is no more requests coming to this apache process, the database connection basically will be sitti

Re: mod_perl2: 304 (not modified) and custom headers

2014-11-12 Thread Alexandr Evstigneev
Sorry about my mails, i'm newbie with that. Don't know, why auto-reporter missed important info, but: Server Version: Apache/2.2.29 (FreeBSD) mod_perl/2.0.8 Perl/v5.20.1 Apache works with worker-mpm And seems that libapreq2 was not installed, so no Apache2::Request 2014-11-12 21:48 GMT+03:00 A

Re: mod_perl2: 304 (not modified) and custom headers

2014-11-12 Thread Alexandr Evstigneev
Made a test script: = #!/usr/bin/perl use Apache2::RequestUtil; my $request = Apache2::RequestUtil->request; $request->headers_out->add('Testheader' => 'Testvalue'); $request->err_headers_out->add('TestheaderErr' => 'TestvalueErr'); $request->status(304); return 304

Re: mod_perl2: 304 (not modified) and custom headers

2014-11-12 Thread Adam Prime
Please send your responses to the list, not just me. It looks like this was broken in apache itself prior to 2.2.0. see: https://issues.apache.org/bugzilla/show_bug.cgi?id=18388 Your bug report doesn't include your apache version though, so i'm not sure that this is related to your problem or

Re: mod_perl2: 304 (not modified) and custom headers

2014-11-12 Thread Adam Prime
Can we see the code you're running into this issue with? It sounds like confusion between $r->headers_out and $r->err_headers_out to me. Adam On 14-11-12 05:09 AM, Alexandr Evstigneev wrote: 1. Problem Description: It seems, that if I set status to 304, all custom headers being ignored and n

mod_perl2: 304 (not modified) and custom headers

2014-11-12 Thread Alexandr Evstigneev
1. Problem Description: It seems, that if I set status to 304, all custom headers being ignored and not sent to to the client. I'm making cross-domain ajax script and it should pass Access-Control-Allow-Origin even on 304 response. Works fine if data been modified but 304 response has no my header