Re: Possible to call Apache expression processor from module?

2013-01-10 Thread Eric Covener
On Thu, Jan 10, 2013 at 11:04 AM,  oh...@cox.net wrote:
 Hi,

 I'm starting to work on a new module, and part of the functionality that I'd 
 like to incorporate would involve processing Apache-type expressions to 
 produce a true/false result that my module would then use to decide what to 
 do, in some cases.

 So, I  was wondering if there is some API or interface that is exposed in 
 Apache that would allow my module to  pass the interface an expression, and 
 get a return result of  true/false?

 I'm not sure if what I'm trying to explain is very clear, but if not, please 
 let me know and I'll try again.


You might look at how mod_rewrite uses ap_expr_* (from
include/ap_expr.h) in trunk or 2.4.

--
Eric Covener
cove...@gmail.com


Re: Possible to call Apache expression processor from module?

2013-01-10 Thread ohaya

 Eric Covener cove...@gmail.com wrote: 
 On Thu, Jan 10, 2013 at 11:04 AM,  oh...@cox.net wrote:
  Hi,
 
  I'm starting to work on a new module, and part of the functionality that 
  I'd like to incorporate would involve processing Apache-type expressions to 
  produce a true/false result that my module would then use to decide what to 
  do, in some cases.
 
  So, I  was wondering if there is some API or interface that is exposed in 
  Apache that would allow my module to  pass the interface an expression, and 
  get a return result of  true/false?
 
  I'm not sure if what I'm trying to explain is very clear, but if not, 
  please let me know and I'll try again.
 
 
 You might look at how mod_rewrite uses ap_expr_* (from
 include/ap_expr.h) in trunk or 2.4.
 
 --
 Eric Covener
 cove...@gmail.com


Eric,

Thanks for the pointer.  I'll  take a look at that.

Jim


Re: Possible to call Apache expression processor from module?

2013-01-10 Thread ohaya

 oh...@cox.net wrote: 
 
  Eric Covener cove...@gmail.com wrote: 
  On Thu, Jan 10, 2013 at 11:04 AM,  oh...@cox.net wrote:
   Hi,
  
   I'm starting to work on a new module, and part of the functionality that 
   I'd like to incorporate would involve processing Apache-type expressions 
   to produce a true/false result that my module would then use to decide 
   what to do, in some cases.
  
   So, I  was wondering if there is some API or interface that is exposed in 
   Apache that would allow my module to  pass the interface an expression, 
   and get a return result of  true/false?
  
   I'm not sure if what I'm trying to explain is very clear, but if not, 
   please let me know and I'll try again.
  
  
  You might look at how mod_rewrite uses ap_expr_* (from
  include/ap_expr.h) in trunk or 2.4.
  
  --
  Eric Covener
  cove...@gmail.com
 
 
 Eric,
 
 Thanks for the pointer.  I'll  take a look at that.
 
 Jim


Hi,

Is the ap_expr.h (and associated functionality only  available in 2.4+?  And 
it's not available in 2.2.x?

Thanks,
Jim



Re: svn commit: r1431215 - /httpd/httpd/branches/2.4.x/STATUS

2013-01-10 Thread Daniel Gruno
On 01/10/2013 10:17 AM, fua...@apache.org wrote:
 Author: fuankg
 Date: Thu Jan 10 09:17:18 2013
 New Revision: 1431215
 
 URL: http://svn.apache.org/viewvc?rev=1431215view=rev
 Log:
 vote.
 
 Modified:
 httpd/httpd/branches/2.4.x/STATUS
 
 Modified: httpd/httpd/branches/2.4.x/STATUS
 URL: 
 http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1431215r1=1431214r2=1431215view=diff
 ==
 --- httpd/httpd/branches/2.4.x/STATUS (original)
 +++ httpd/httpd/branches/2.4.x/STATUS Thu Jan 10 09:17:18 2013
 @@ -104,6 +104,7 @@ PATCHES PROPOSED TO BACKPORT FROM TRUNK:
2.4.x patch: http://www.humbedooh.com/apache/lua_dbd.patch
 + CHANGES
+1: humbedooh
 +  -1: fuankg - we 1st need some workarounds for stupid CodeWarrior 
 compiler.

 * configure --with-modules:
   - Fix shell errors when trying to AC_MSG_RESULT().
 
 
How am I supposed to write a workaround for a compiler I apparently
can't run on any of my computers (and also have to pay for?)?

Can you provide me with the errors that it produces, or some tips on how
I can possibly run this compiler on my own computer? Otherwise, I really
don't know what to do here - the bindings work fine on all the machines
I've tested them on.

With regards,
Daniel.


Re: svn commit: r1431215 - /httpd/httpd/branches/2.4.x/STATUS

2013-01-10 Thread Guenter Knauf

Hi Daniel,
Am 10.01.2013 10:34, schrieb Daniel Gruno:

Can you provide me with the errors that it produces, or some tips on how
I can possibly run this compiler on my own computer? Otherwise, I really
don't know what to do here - the bindings work fine on all the machines
I've tested them on.
meanwhile all clarfied; I was writing the mail to you just after I did 
mention the prob in STATUS;

just wanted to avoid that the backport takes place without a workaround.
Thanks for your quick coding!

Gün.




Re: svn commit: r1431215 - /httpd/httpd/branches/2.4.x/STATUS

2013-01-10 Thread Daniel Gruno
On 01/10/2013 01:52 PM, Guenter Knauf wrote:
 Hi Daniel,
 Am 10.01.2013 10:34, schrieb Daniel Gruno:
 Can you provide me with the errors that it produces, or some tips on how
 I can possibly run this compiler on my own computer? Otherwise, I really
 don't know what to do here - the bindings work fine on all the machines
 I've tested them on.
 meanwhile all clarfied; I was writing the mail to you just after I did
 mention the prob in STATUS;
 just wanted to avoid that the backport takes place without a workaround.
 Thanks for your quick coding!
 
 Gün.
 
 
Yeah, it did seem a bit funny that those emails arrived at about the
same time. I've done some manual pushing of functions now, that work
just as well - the 3D array was really just a convenient way of pushing
everything, and a standard Lua-C practice. Hopefully we won't get any
more compiler errors :)

With regards,
Daniel.


Re: svn commit: r1431331 - /httpd/httpd/branches/2.4.x/STATUS

2013-01-10 Thread Rainer Jung
On 10.01.2013 14:01, j...@apache.org wrote:
 Author: jim
 Date: Thu Jan 10 13:01:46 2013
 New Revision: 1431331
 
 URL: http://svn.apache.org/viewvc?rev=1431331view=rev
 Log:
 Merge r1418524 from trunk:
 
 Use ap_rputs instead of ap_rvputs where applicable.
 Submitted by: jailletc36
 Reviewed/backported by: jim
 
 Modified:
 httpd/httpd/branches/2.4.x/STATUS

It seems the actual merge is missing. The commit only contains STATUS
changes.

Regards,

Rainer



Re: svn commit: r1431331 - /httpd/httpd/branches/2.4.x/STATUS

2013-01-10 Thread Rainer Jung
Forget this, it was already backported as part of 1420696.

Sorry for the noise.

Rainer

On 10.01.2013 14:18, Rainer Jung wrote:
 On 10.01.2013 14:01, j...@apache.org wrote:
 Author: jim
 Date: Thu Jan 10 13:01:46 2013
 New Revision: 1431331

 URL: http://svn.apache.org/viewvc?rev=1431331view=rev
 Log:
 Merge r1418524 from trunk:

 Use ap_rputs instead of ap_rvputs where applicable.
 Submitted by: jailletc36
 Reviewed/backported by: jim

 Modified:
 httpd/httpd/branches/2.4.x/STATUS
 
 It seems the actual merge is missing. The commit only contains STATUS
 changes.
 
 Regards,
 
 Rainer


Re: event mpm and mod_status

2013-01-10 Thread Niklas Edmundsson


To reiterate back to the event mpm / mod_status integration, are there 
any work in progress on implementing a more verbose status display for 
the event mpm? I'm thinking of something that can show all requests 
currently being processed like we have today for prefork/worker. The 
current thread status thingie is probably interesting too, but more 
from a developer/server diag point of view.


How hitech does it have to be? Would using mod_socache for storage be 
a reasonable way to do it? Personally I find it a bit rough around the 
edges (no locking for example, so all users have to use a single big 
lock for all access), but perhaps it's good enough anyway?


As it stands this seems to be the only blocker for us trying to use 
the event mpm for file archive serving, so if there's any work being 
done on the subject I'm very interested :)


/Nikke
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 Niklas Edmundsson, Admin @ {acc,hpc2n}.umu.se  | ni...@acc.umu.se
---
 Old Vulcan Proverb Only Nixon could go to China
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Re: svn commit: r1431215 - /httpd/httpd/branches/2.4.x/STATUS

2013-01-10 Thread Gregg Smith

Hi Daniel,

On 1/10/2013 4:55 AM, Daniel Gruno wrote:

On 01/10/2013 01:52 PM, Guenter Knauf wrote:

Hi Daniel,
Am 10.01.2013 10:34, schrieb Daniel Gruno:

Can you provide me with the errors that it produces, or some tips on how
I can possibly run this compiler on my own computer? Otherwise, I really
don't know what to do here - the bindings work fine on all the machines
I've tested them on.


Unfortunately, all the lua_pushcfunctions are nightmarish on Windows from
.\lua_dbd.c(662) : error C2440: 'function' : cannot convert from 'int 
(__stdcall *)(lua_State *)' to 'lua_CFunction'

to
.\lua_dbd.c(692) : error C2440: 'function' : cannot convert from 'int 
(__stdcall *)(lua_State *)' to 'lua_CFunction'

Casting the int function to lua_CFunction seems to work.

Your 2.4 patch seems to be missing this part of r1430225
http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/mod_lua.dsp?r1=1430225r2=1430224pathrev=1430225

On a side note there's this, not sure how long that's been there, it 
just seems wrong not having a 'case' return something.
c:\build2\httpd-2.4.x_r1431331\modules\lua\mod_lua.c(110) : warning 
C4715: 'scope_to_string' : not all control paths return a value


Cheers,

Gregg


Re: svn commit: r1431215 - /httpd/httpd/branches/2.4.x/STATUS

2013-01-10 Thread Gregg Smith

On 1/10/2013 1:33 PM, Gregg Smith wrote:


Your 2.4 patch seems to be missing this part of r1430225
http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/mod_lua.dsp?r1=1430225r2=1430224pathrev=1430225 





This is also needed
http://svn.apache.org/viewvc?view=revisionrevision=1431681


Re: svn commit: r1431215 - /httpd/httpd/branches/2.4.x/STATUS

2013-01-10 Thread Daniel Gruno
On 01/10/2013 10:33 PM, Gregg Smith wrote:
 Hi Daniel,
 
 On 1/10/2013 4:55 AM, Daniel Gruno wrote:
 On 01/10/2013 01:52 PM, Guenter Knauf wrote:
 Hi Daniel,
 Am 10.01.2013 10:34, schrieb Daniel Gruno:
 Can you provide me with the errors that it produces, or some tips on
 how
 I can possibly run this compiler on my own computer? Otherwise, I
 really
 don't know what to do here - the bindings work fine on all the machines
 I've tested them on.
 
 Unfortunately, all the lua_pushcfunctions are nightmarish on Windows from
 .\lua_dbd.c(662) : error C2440: 'function' : cannot convert from 'int
 (__stdcall *)(lua_State *)' to 'lua_CFunction'
 to
 .\lua_dbd.c(692) : error C2440: 'function' : cannot convert from 'int
 (__stdcall *)(lua_State *)' to 'lua_CFunction'
 Casting the int function to lua_CFunction seems to work.
 
 Your 2.4 patch seems to be missing this part of r1430225
 http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/mod_lua.dsp?r1=1430225r2=1430224pathrev=1430225
 
 
 On a side note there's this, not sure how long that's been there, it
 just seems wrong not having a 'case' return something.
 c:\build2\httpd-2.4.x_r1431331\modules\lua\mod_lua.c(110) : warning
 C4715: 'scope_to_string' : not all control paths return a value
 
 Cheers,
 
 Gregg
Why can't we just make httpd run on UNIX and say that that's it ;)
sigh, I guess I have to do some more work on this ting today,
thanks for letting me know :) It's appreciated that people actually try
these things out and give such good feedback as is given on the http
project.

With regards,
Daniel.


Re: svn commit: r1431215 - /httpd/httpd/branches/2.4.x/STATUS

2013-01-10 Thread Daniel Gruno
On 01/10/2013 10:33 PM, Gregg Smith wrote:
 
 On a side note there's this, not sure how long that's been there, it
 just seems wrong not having a 'case' return something.
 c:\build2\httpd-2.4.x_r1431331\modules\lua\mod_lua.c(110) : warning
 C4715: 'scope_to_string' : not all control paths return a value
 
 Cheers,
 
 Gregg
That's been fixed in trunk with r1422373, just fyi (though probably not
just backportable, as it was part of a larger fix to trunk code).
It's not a real issue though, but yeah, it doesn't hurt to make
compilers happy (most of the time).

With regards,
Daniel.