Re: slotmem API notes

2009-05-14 Thread jean-frederic clere
Chris Darroch wrote: Hi -- Well, I should be working on mod_fcgid but I wanted to first follow up on a long-ago promise to review the slotmem API by developing a "test harness" framework and a slotmem provider that worked with ZooKeeper as an experiment. To that end, mod_shmap now offers a

Re: svn commit: r735516 - /httpd/httpd/trunk/server/log.c

2009-05-14 Thread Rainer Jung
On 13.05.2009 22:38, William A. Rowe, Jr. wrote: > -1. There's really no excuse to abstract an abstraction, when you > could have simply added 'int special_stderr;' to the piped_log struct. I reverted. Moving the new member to the existing piped_log structure makes it publicly visible. As for now

P3P policy for each virtual host

2009-05-14 Thread Paras Fadte
Hi, Is it possible to set different P3P policy for each of the virtual hosts defined in Apache ? Thank you. -Paras

Re: svn commit: r774730 - /httpd/httpd/trunk/server/log.c

2009-05-14 Thread Dan Poirier
rj...@apache.org writes: > Log: > Add name of program to spawn to the error > message, when starting piped loggers fails. Thanks. Error messages that keep secret the information you need to fix the error are so frustrating. -- Dan Poirier

Re: ap_slotmem

2009-05-14 Thread Jim Jagielski
On May 14, 2009, at 2:49 AM, jean-frederic clere wrote: Jim Jagielski wrote: On May 13, 2009, at 12:01 PM, jean-frederic clere wrote: Jim Jagielski wrote: On May 13, 2009, at 10:17 AM, jean-frederic clere wrote: Jim Jagielski wrote: OK, I think having 2 more API functions rounds out the im

Re: slotmem API notes

2009-05-14 Thread Jim Jagielski
On May 14, 2009, at 12:37 AM, Chris Darroch wrote: Remove mod_slotmem (server/slotmem.c) and the associated ap_slotmem_*() "wrapper" functions. They do nothing that I can see except add an extra layer of complexity. I had no problems using the standard provider interface to the slotmem

Re: slotmem API notes

2009-05-14 Thread Jim Jagielski
On May 14, 2009, at 12:37 AM, Chris Darroch wrote: Hi -- So, define AP_SLOTMEM_PROVIDER_GROUP as "slotmem" and AP_SLOTMEM_PROVIDER_VERSION as "0". Remove AP_SLOTMEM_STORAGE. Rename mod_sharedmem to mod_slotmem_shm and mod_plainmem to mod_slotmem_plain. Rename ap_slotmem_storage_method to

Re: slotmem API notes

2009-05-14 Thread Plüm, Rüdiger, VF-Group
> -Ursprüngliche Nachricht- > Von: Jim Jagielski > Gesendet: Donnerstag, 14. Mai 2009 14:46 > An: dev@httpd.apache.org > Betreff: Re: slotmem API notes > > In general, I think that a provider should know if it is thread-safe > or not and simply "work" without the user needing to know

Re: slotmem API notes

2009-05-14 Thread Jim Jagielski
On May 14, 2009, at 3:36 AM, jean-frederic clere wrote: It would also clear up some things I find odd at the moment; for instance, why is there locking in the do() method but not the put() method? The do operates on all slots put/get only in one... May be a flag in the create. Something l

Re: svn commit: r735516 - /httpd/httpd/trunk/server/log.c

2009-05-14 Thread Joe Orton
On Thu, May 14, 2009 at 12:51:18PM +0200, Rainer Jung wrote: > On 13.05.2009 22:38, William A. Rowe, Jr. wrote: > > Please revert the introduction of a _wrapper struct and let's simply > > fix the piped_log structure? > > Do we really want to add it to the public API? There's no need for that str

Re: svn commit: r774454 - in /httpd/httpd/trunk: include/ap_slotmem.h modules/mem/mod_plainmem.c modules/mem/mod_sharedmem.c server/slotmem.c

2009-05-14 Thread Jim Jagielski
On May 14, 2009, at 2:33 AM, jean-frederic clere wrote: Jim Jagielski wrote: On May 13, 2009, at 3:40 PM, Jim Jagielski wrote: On May 13, 2009, at 3:22 PM, jean-frederic clere wrote: j...@apache.org wrote: Author: jim Date: Wed May 13 18:04:05 2009 New Revision: 774454 URL: http://svn.apa

Re: svn commit: r774454 - in /httpd/httpd/trunk: include/ap_slotmem.h modules/mem/mod_plainmem.c modules/mem/mod_sharedmem.c server/slotmem.c

2009-05-14 Thread Jim Jagielski
On May 14, 2009, at 10:16 AM, Jim Jagielski wrote: On May 14, 2009, at 2:33 AM, jean-frederic clere wrote: Thanks. The idea of ap_slotmem_mem is to provide an address in the shared area that can be used for example like the proxy_worker_stat. Using get/put would require 2 memcpy I hat

Re: svn commit: r735516 - /httpd/httpd/trunk/server/log.c

2009-05-14 Thread Rainer Jung
On 14.05.2009 15:49, Joe Orton wrote: > On Thu, May 14, 2009 at 12:51:18PM +0200, Rainer Jung wrote: >> On 13.05.2009 22:38, William A. Rowe, Jr. wrote: >>> Please revert the introduction of a _wrapper struct and let's simply >>> fix the piped_log structure? >> Do we really want to add it to the pu

Re: svn commit: r774755 - in /httpd/httpd/trunk: CHANGES server/log.c

2009-05-14 Thread William A. Rowe, Jr.
rj...@apache.org wrote: > Author: rjung > Date: Thu May 14 12:59:25 2009 > New Revision: 774755 > > URL: http://svn.apache.org/viewvc?rev=774755&view=rev > Log: > Allow relative pathnames for piped loggers in ErrorLog. > --- httpd/httpd/trunk/server/log.c (original) > +++ httpd/httpd/trunk/server

Re: svn commit: r735516 - /httpd/httpd/trunk/server/log.c

2009-05-14 Thread William A. Rowe, Jr.
Rainer Jung wrote: > On 13.05.2009 22:38, William A. Rowe, Jr. wrote: >> -1. There's really no excuse to abstract an abstraction, when you >> could have simply added 'int special_stderr;' to the piped_log struct. > > I reverted. Moving the new member to the existing piped_log structure > makes it

Re: svn commit: r735516 - /httpd/httpd/trunk/server/log.c

2009-05-14 Thread William A. Rowe, Jr.
Rainer Jung wrote: > On 14.05.2009 15:49, Joe Orton wrote: >> On Thu, May 14, 2009 at 12:51:18PM +0200, Rainer Jung wrote: >>> On 13.05.2009 22:38, William A. Rowe, Jr. wrote: Please revert the introduction of a _wrapper struct and let's simply fix the piped_log structure? >>> Do we reall

Re: svn commit: r774755 - in /httpd/httpd/trunk: CHANGES server/log.c

2009-05-14 Thread Rainer Jung
On 14.05.2009 18:03, William A. Rowe, Jr. wrote: > rj...@apache.org wrote: >> Author: rjung >> Date: Thu May 14 12:59:25 2009 >> New Revision: 774755 >> >> URL: http://svn.apache.org/viewvc?rev=774755&view=rev >> Log: >> Allow relative pathnames for piped loggers in ErrorLog. > >> --- httpd/httpd/

Re: svn commit: r774755 - in /httpd/httpd/trunk: CHANGES server/log.c

2009-05-14 Thread William A. Rowe, Jr.
Rainer Jung wrote: > > The code is identical to what we do in mod_rewrite and mod_log_forensic. > I'll check the details, but I didn't commit this in January without > testing especially with rotatelogs and params. Thanks for pointing me at those other bugs! There's little need to dwell on the f

Re: svn commit: r774755 - in /httpd/httpd/trunk: CHANGES server/log.c

2009-05-14 Thread Rainer Jung
On 14.05.2009 18:50, William A. Rowe, Jr. wrote: > Rainer Jung wrote: >> The code is identical to what we do in mod_rewrite and mod_log_forensic. >> I'll check the details, but I didn't commit this in January without >> testing especially with rotatelogs and params. > > Thanks for pointing me at t

Re: svn commit: r774884 - /httpd/httpd/trunk/server/log.c

2009-05-14 Thread William A. Rowe, Jr.
rj...@apache.org wrote: > Author: rjung > Date: Thu May 14 19:13:17 2009 > New Revision: 774884 > > URL: http://svn.apache.org/viewvc?rev=774884&view=rev > Log: > Revert r774755: ap_server_root_relative() for > > piped loggers is nonsense. It doesn't work when > the logger path contains whitespac

Re: svn commit: r774755 - in /httpd/httpd/trunk: CHANGES server/log.c

2009-05-14 Thread William A. Rowe, Jr.
Rainer Jung wrote: > > I checked it and you are totally right. Using ap_server_root_relative() > breaks whitespace handling. I'll do a separate post about some > inconsistencies in the path handling between Windows and Unix. Since paths on unix and windows are inconsistent in the first place, I'm

Re: svn commit: r774884 - /httpd/httpd/trunk/server/log.c

2009-05-14 Thread William A. Rowe, Jr.
William A. Rowe, Jr. wrote: > rj...@apache.org wrote: >> Author: rjung >> Date: Thu May 14 19:13:17 2009 >> New Revision: 774884 >> >> URL: http://svn.apache.org/viewvc?rev=774884&view=rev >> Log: >> Revert r774755: ap_server_root_relative() for >> >> piped loggers is nonsense. It doesn't work when

Working directory, piped logs and relative paths

2009-05-14 Thread Rainer Jung
I noticed some differences between Unix and Windows way of handling piped loggers I wanted to give notice of: Both platforms use a shell resp. cmd.exe to start the piped logger. In principle both allow to use a relative path for the log program. On Unix the working directory of the httpd processe

Re: svn commit: r774884 - /httpd/httpd/trunk/server/log.c

2009-05-14 Thread Rainer Jung
On 14.05.2009 23:06, William A. Rowe, Jr. wrote: > rj...@apache.org wrote: >> Author: rjung >> Date: Thu May 14 19:13:17 2009 >> New Revision: 774884 >> >> URL: http://svn.apache.org/viewvc?rev=774884&view=rev >> Log: >> Revert r774755: ap_server_root_relative() for >> >> piped loggers is nonsense.

Re: slotmem API notes

2009-05-14 Thread Chris Darroch
Jim Jagielski wrote: Remove mod_slotmem (server/slotmem.c) and the associated ap_slotmem_*() "wrapper" functions. It's just an additional abstraction, agreed. I'm fine with removing it but got the impression that people *wanted* that abstraction. jean-frederic clere wrote: In mod_cluste

Re: slotmem API notes

2009-05-14 Thread Chris Darroch
Jim Jagielski wrote: But my personal preference would be to remove it and instead add an unsigned int flags field to ap_slotmem_provider_t, and define some flag values, such as AP_SLOTMEM_FLAG_NOTMPSAFE = 0x0001 (read "not MP-safe") and AP_SLOTMEM_FLAG_PERSIST = 0x0002. Again, +1 for this ch

Re: slotmem API notes

2009-05-14 Thread Chris Darroch
Jim Jagielski wrote: At any rate, moving responsibility for locking up to the caller level, as the socache API does, I think makes a lot of sense. It means that a caller running in a single-process, single-threaded context can simply choose not to add the overhead of a global lock. Other call

Re: slotmem API notes

2009-05-14 Thread Chris Darroch
jean-frederic clere wrote: It would be great to pass server_rec* and apr_pool_t* arguments to all the methods (except maybe num_slots() and slot_size()). Some providers may need to report error messages, and to do that they really need a server_rec*. They may also need to allocate data from a

Re: slotmem API notes

2009-05-14 Thread Chris Darroch
Jim Jagielski wrote: On May 14, 2009, at 3:36 AM, jean-frederic clere wrote: Yeah... when a do is done, we want to ensure that none of the slots change since we are touching all slots. In general, we assume that with get and put, only one thread is touch any particular slot at one time. W