ap_sub_req_lookup_uri(r-uri, r, NULL)-content_type always returns 'text/plain'?

2009-11-14 Thread ohaya
Hi, I'm not sure if this is the appropriate list, or if I should post on the regular httpd list... I've been trying to work with an Apache module, mod_limitipconn: http://dominia.org/djao/limitipconn2.html This is with Apache 2.2.8/2.2.11. Our use case is slightly different that the original

Re: ap_sub_req_lookup_uri(r-uri, r, NULL)-content_type always returns 'text/plain'?

2009-11-14 Thread ohaya
Eric Covener cove...@gmail.com wrote: On Sat, Nov 14, 2009 at 7:37 PM, oh...@cox.net wrote: Our use case is slightly different that the original one for this module.   The original code is designed to limit the number of connections from any given IP address, whereas in my case,

Static vs. Shared module precedence was Re: ap_sub_req_lookup_uri(r-uri, r, NULL)-content_type always returns 'text/plain'?

2009-11-14 Thread ohaya
oh...@cox.net wrote: oh...@cox.net wrote: Hi, I'm not sure if this is the appropriate list, or if I should post on the regular httpd list... I've been trying to work with an Apache module, mod_limitipconn: http://dominia.org/djao/limitipconn2.html This is

Re: Static vs. Shared module precedence was Re: ap_sub_req_lookup_uri(r-uri, r, NULL)-content_type always returns 'text/plain'?

2009-11-14 Thread ohaya
oh...@cox.net wrote: oh...@cox.net wrote: oh...@cox.net wrote: oh...@cox.net wrote: Hi, I'm not sure if this is the appropriate list, or if I should post on the regular httpd list... I've been trying to work with an Apache module,

Re: Static vs. Shared module precedence was Re: ap_sub_req_lookup_uri(r-uri, r, NULL)-content_type always returns 'text/plain'?

2009-11-15 Thread ohaya
Eric Covener cove...@gmail.com wrote: Is the problem that the original Apache was on a 64-bit system? Could the Apache API on the 64-bit system be behaving differently than on a 32-bit system? Seems unlikely. I also checked and mod_limitipconn and mod_mime don't even operate in

May have found the culprit was Re: ap_sub_req_lookup_uri(r-uri, r, NULL)-content_type always returns 'text/plain'?

2009-11-15 Thread ohaya
Hi, With further testing, I think that I've identified that mod_limitipconn is not able to get the Content-Type/content_type when the URL is being proxied to a WebLogic server via a plugin/module that comes with WebLogic (the WebLogic Plugin for Apache). [NOTE: mod_limitipconn still DOES get

How to access client certificate PEM and incoming request headers in a module?

2012-06-17 Thread ohaya
Hi, I am starting to look into implementing an Apache module that can use information from an incoming request, including several headers and the subject string from a client certificate to do authentication. I've been looking at the source for mod_auth_certificate, from

Re: How to access client certificate PEM and incoming request headers in a module?

2012-06-17 Thread ohaya
Ben Noordhuis i...@bnoordhuis.nl wrote: On Sun, Jun 17, 2012 at 9:46 PM, oh...@cox.net wrote: Hi, I am starting to look into implementing an Apache module that can use information from an incoming request, including several headers and the subject string from a client

Re: How to access client certificate PEM and incoming request headers in a module?

2012-06-17 Thread ohaya
oh...@cox.net wrote: Ben Noordhuis i...@bnoordhuis.nl wrote: On Sun, Jun 17, 2012 at 9:46 PM, oh...@cox.net wrote: Hi, I am starting to look into implementing an Apache module that can use information from an incoming request, including several headers and the

Re: How to access client certificate PEM and incoming request headers in a module?

2012-06-18 Thread ohaya
Ben Noordhuis i...@bnoordhuis.nl wrote: On Mon, Jun 18, 2012 at 5:45 AM, oh...@cox.net wrote: I haven't actually tried your suggestion yet, but, re. the SSL variables, I was looking at mod_headers.c, and in there, there are two separate functions: static const char

Re: How to access client certificate PEM and incoming request headers in a module?

2012-06-18 Thread ohaya
Hi Sorin and Ben, I found a list of variables somewhere, and just (probably unluckily) picked REMOTE_URI, just to see if retrieving any variable would work (an experiment). Is there a list of environment variables that WOULD return something other than null for that call? Thanks, Jim

Re: How to access client certificate PEM and incoming request headers in a module?

2012-06-18 Thread ohaya
Hi, I found some snippets that I used to make some dump_requests and dump_envvars functions: /* START DUMP CODE * Adapted from: http://thomas.eibner.dk/apache/table.html */ int iterate_func(void *req, const char *key, const char *value) { int stat; char *line; request_rec *r =

Re: How to access client certificate PEM and incoming request headers in a module?

2012-06-18 Thread ohaya
Hi, Also, I configured the Apache for client-authenticated SSL, and hit the https://hostname/test URL, and the dump_envvars() output only one additional variable: In ap_headers_insert_output_filter: About to call dump_envvars... In iterate_function: [UNIQUE_ID] = [T993fkjX4QkAAHanMQwA] In

How to *add* a cookie in module?

2012-06-18 Thread ohaya
Hi, This is a followup to an earlier post/question, How to access client certificate PEM and incoming request headers in a module?. As before, I'm starting with mod_headers.c, and then tweaking it, partly experimenting with modules, and partly for a project that I'm working on (eventually).

Re: How to *add* a cookie in module?

2012-06-18 Thread ohaya
oh...@cox.net wrote: Hi, This is a followup to an earlier post/question, How to access client certificate PEM and incoming request headers in a module?. As before, I'm starting with mod_headers.c, and then tweaking it, partly experimenting with modules, and partly for a project

Re: How to *add* a cookie in module?

2012-06-19 Thread ohaya
Sorin Manolache sor...@gmail.com wrote: On 2012-06-19 07:26, oh...@cox.net wrote: Hi, I spoke too soon :( The apr_table_mergen puts a comma (,) in between each cookie name/value pair, rather than a semicolon (;). So, does anyone know how I can accomplish the merge of the

Best (safest) way to edit char string (from envvars)?

2012-06-20 Thread ohaya
Hi, I am working on a module, and I get one of the SSL envvars, SSL_CLIENT_CERT, using apr_table_get() into a const char *. The client cert char string returned has the extra beginning line (-BEGIN CERTIFICATE-) and ending line (-END CERTIFICATE-), but I need to remove both of

Re: Best (safest) way to edit char string (from envvars)?

2012-06-20 Thread ohaya
Daniel Gruno rum...@cord.dk wrote: On 06/20/2012 06:17 PM, oh...@cox.net wrote: Hi Ben and Daniel, I must be doing wrong. After I added code to strip the begin and end lines, I get a segfault when I test. I notice that the apr_cpystrn() doesn't include a pool parameter,

How to compiling/link/use Apache module that uses shared library?

2012-06-21 Thread ohaya
Hi, I am (still) working on a module that uses another commercial shared object library (.so). I use the following to successfully build the module (currently, just tweaking mod_headers.c for testing): /apps/httpd/bin/apxs -L /apps/netpoint/AccessServerSDK/oblix/lib/ -c -i -a

Re: How to compiling/link/use Apache module that uses shared library?

2012-06-21 Thread ohaya
oh...@cox.net wrote: Sorin Manolache sor...@gmail.com wrote: On 2012-06-21 19:47, oh...@cox.net wrote: I've tried using -l pointing directly to the .so, libobaccess.so, but when I do that, it says it can't find the .so: [root@apachemodule build-mod_headers]#

Re: How to compiling/link/use Apache module that uses shared library?

2012-06-21 Thread ohaya
oh...@cox.net wrote: Sorin Manolache sor...@gmail.com wrote: On 2012-06-21 19:47, oh...@cox.net wrote: I've tried using -l pointing directly to the .so, libobaccess.so, but when I do that, it says it can't find the .so: [root@apachemodule build-mod_headers]#

Re: How to compiling/link/use Apache module that uses shared library?

2012-06-21 Thread ohaya
oh...@cox.net wrote: oh...@cox.net wrote: Sorin Manolache sor...@gmail.com wrote: On 2012-06-21 19:47, oh...@cox.net wrote: I've tried using -l pointing directly to the .so, libobaccess.so, but when I do that, it says it can't find the .so:

Re: How to compiling/link/use Apache module that uses shared library?

2012-06-21 Thread ohaya
Joe Lewis j...@joe-lewis.com wrote: On 6/21/12 1:40 PM, oh...@cox.net wrote: oh...@cox.net wrote: Sorin Manolachesor...@gmail.com wrote: On 2012-06-21 19:47, oh...@cox.net wrote: I've tried using -l pointing directly to the .so, libobaccess.so, but when I do that,

Re: How to compiling/link/use Apache module that uses shared library?

2012-06-21 Thread ohaya
Sorin Manolache sor...@gmail.com wrote: On 2012-06-21 22:04, oh...@cox.net wrote: Ben Noordhuis i...@bnoordhuis.nl wrote: On Thu, Jun 21, 2012 at 8:43 PM, oh...@cox.net wrote: I tried that, which allowed me to start Apache, but am getting a segfault. Run it through gdb

Re: How to compiling/link/use Apache module that uses shared library?

2012-06-21 Thread ohaya
Sorin Manolache sor...@gmail.com wrote: And I forgot to say: run gdb in some sort of environment where you see your current source code line and a couple of surrounding lines. You could achieve this with the list command, but I prefer running gdb in emacs and let emacs do the nice

UNSOLVED was Re: SOLVED was Re: How to compiling/link/use Apache module that uses shared library?

2012-06-21 Thread ohaya
Joe Lewis j...@joe-lewis.com wrote: On 6/21/12 5:49 PM, oh...@cox.net wrote: oh...@cox.net wrote: Sorin Manolachesor...@gmail.com wrote: And I forgot to say: run gdb in some sort of environment where you see your current source code line and a couple of surrounding

Re: UNSOLVED was Re: SOLVED was Re: How to compiling/link/use Apache module that uses shared library?

2012-06-21 Thread ohaya
oh...@cox.net wrote: Joe Lewis j...@joe-lewis.com wrote: On 6/21/12 5:49 PM, oh...@cox.net wrote: oh...@cox.net wrote: Sorin Manolachesor...@gmail.com wrote: And I forgot to say: run gdb in some sort of environment where you see your current source code

Re: UNSOLVED was Re: SOLVED was Re: How to compiling/link/use Apache module that uses shared library?

2012-06-21 Thread ohaya
Joe Lewis j...@joe-lewis.com wrote: On 6/21/12 6:46 PM, oh...@cox.net wrote: Joe Lewisj...@joe-lewis.com wrote: On 6/21/12 5:49 PM, oh...@cox.net wrote: oh...@cox.net wrote: Sorin Manolachesor...@gmail.com wrote: And I forgot to say: run gdb in some sort of

Re: UNSOLVED was Re: SOLVED was Re: How to compiling/link/use Apache module that uses shared library?

2012-06-21 Thread ohaya
Joe Lewis j...@joe-lewis.com wrote: On 6/21/12 7:32 PM, oh...@cox.net wrote: oh...@cox.net wrote: Joe Lewisj...@joe-lewis.com wrote: On 6/21/12 6:46 PM, oh...@cox.net wrote: Joe Lewisj...@joe-lewis.com wrote: On 6/21/12 5:49 PM, oh...@cox.net wrote:

Re: UNSOLVED was Re: SOLVED was Re: How to compiling/link/use Apache module that uses shared library?

2012-06-21 Thread ohaya
oh...@cox.net wrote: oh...@cox.net wrote: Joe Lewis j...@joe-lewis.com wrote: On 6/21/12 7:32 PM, oh...@cox.net wrote: oh...@cox.net wrote: Joe Lewisj...@joe-lewis.com wrote: On 6/21/12 6:46 PM, oh...@cox.net wrote: Joe

Re: UNSOLVED was Re: SOLVED was Re: How to compiling/link/use Apache module that uses shared library?

2012-06-21 Thread ohaya
Joe Lewis j...@joe-lewis.com wrote: On 6/21/12 9:39 PM, oh...@cox.net wrote: oh...@cox.net wrote: oh...@cox.net wrote: Joe Lewisj...@joe-lewis.com wrote: On 6/21/12 7:32 PM, oh...@cox.net wrote: oh...@cox.net wrote: Joe Lewisj...@joe-lewis.com wrote:

Re: UNSOLVED was Re: SOLVED was Re: How to compiling/link/use Apache module that uses shared library?

2012-06-22 Thread ohaya
oh...@cox.net wrote: Rainer Jung rainer.j...@kippdata.de wrote: On 22.06.2012 06:10, Joe Lewis wrote: On 6/21/12 10:02 PM, oh...@cox.net wrote: Joe Lewisj...@joe-lewis.com wrote: On 6/21/12 9:39 PM, oh...@cox.net wrote: oh...@cox.net wrote:

Re: UNSOLVED was Re: SOLVED was Re: How to compiling/link/use Apache module that uses shared library?

2012-06-22 Thread ohaya
Joe Lewis j...@joe-lewis.com wrote: On 6/22/12 6:16 AM, oh...@cox.net wrote: oh...@cox.net wrote: Rainer Jungrainer.j...@kippdata.de wrote: On 22.06.2012 06:10, Joe Lewis wrote: On 6/21/12 10:02 PM, oh...@cox.net wrote: Joe Lewisj...@joe-lewis.com wrote: On

Re: Followup to earlier thread about How to compiling/link/use Apache module that uses shared library?

2012-06-22 Thread ohaya
Joe Lewis j...@joe-lewis.com wrote: On 6/22/12 9:35 AM, oh...@cox.net wrote: oh...@cox.net wrote: Hi, Now that I've gotten by earlier problems with the module I'm working on (see thread Re: UNSOLVED was Re: SOLVED was Re: How to compiling/link/use Apache module that uses

Re: Followup to earlier thread about How to compiling/link/use Apache module that uses shared library?

2012-06-22 Thread ohaya
Sorin Manolache sor...@gmail.com wrote: On 2012-06-22 17:35, oh...@cox.net wrote: Sorry. I meant to say: So, my code calls ObConfig_initialize() then it appears that that calls ObConfig::initialize() which is presumably a C++ function. We develop our apache modules in

Re: Followup to earlier thread about How to compiling/link/use Apache module that uses shared library?

2012-06-22 Thread ohaya
Sorin Manolache sor...@gmail.com wrote: On 2012-06-22 21:22, oh...@cox.net wrote: Does that confirm that they statically linked stuff from openssl (and libcrypto) into libobaccess.so? I think so. Also you can run nm -aC liboaccess.so. The symbols marked with U are undefined

Anyone have some example code doing simple HTTP GET request from within a module?

2012-06-22 Thread ohaya
Hi, Per earlier threads on this list, I've been working on an Apache module. For the time being, I'm kind of stuck because of the problems that I've run into with trying to integrate my module with a 3rd party library, so just for my module, which is mainly a proof-of-concept, I'd like to

Re: Anyone have some example code doing simple HTTP GET request from within a module?

2012-06-23 Thread ohaya
Sorin Manolache sor...@gmail.com wrote: On 2012-06-23 04:47, oh...@cox.net wrote: Hi, Per earlier threads on this list, I've been working on an Apache module. For the time being, I'm kind of stuck because of the problems that I've run into with trying to integrate my module

Re: Confused about modules processing order...

2012-06-26 Thread ohaya
Sorin Manolache sor...@gmail.com wrote: On 2012-06-26 03:49, oh...@cox.net wrote: Hi, I have my small prototype module, which I implemented starting with the mod_headers.c source, working. The changes that I did to the original source were to add some code in the

Re: Confused about modules processing order...

2012-06-26 Thread ohaya
Sorin Manolache sor...@gmail.com wrote: On 2012-06-26 13:14, oh...@cox.net wrote: Sorin Manolache sor...@gmail.com wrote: On 2012-06-26 03:49, oh...@cox.net wrote: Hi, I have my small prototype module, which I implemented starting with the mod_headers.c source,

Re: Confused about modules processing order...

2012-06-26 Thread ohaya
oh...@cox.net wrote: Sorin Manolache sor...@gmail.com wrote: On 2012-06-26 13:14, oh...@cox.net wrote: Sorin Manolache sor...@gmail.com wrote: On 2012-06-26 03:49, oh...@cox.net wrote: Hi, I have my small prototype module, which I implemented starting

Re: Confused about modules processing order...

2012-06-26 Thread ohaya
Sorin Manolache sor...@gmail.com wrote: On 2012-06-26 13:55, oh...@cox.net wrote: And for webgate, I see: Registering hooks for apache2entry_web_gate.cpp Hooked post_config Hooked handler Hooked check_user_id Hooked auth_checker The original

Re: Confused about modules processing order...

2012-06-26 Thread ohaya
oh...@cox.net wrote: Sorin Manolache sor...@gmail.com wrote: On 2012-06-26 13:55, oh...@cox.net wrote: And for webgate, I see: Registering hooks for apache2entry_web_gate.cpp Hooked post_config Hooked handler Hooked check_user_id

Re: ssl_var_lookup snippet was Re: Confused about modules processing order...

2012-06-27 Thread ohaya
William A. Rowe Jr. wr...@rowe-clan.net wrote: On 6/26/2012 3:17 PM, oh...@cox.net wrote: Sorin Manolache sor...@gmail.com wrote: On 2012-06-26 19:56, oh...@cox.net wrote: You cannot wait until mod_ssl runs its fixups, you have to hook one of the hooks that execute earlier

Re: How to access string in a module that is set in configuration directive?

2012-06-30 Thread ohaya
Daniel Gruno rum...@cord.dk wrote: On 06/30/2012 10:33 PM, oh...@cox.net wrote: Hi,. Can anyone tell me how, in my module code, I can access that MyVar string? Thanks, Jim You can either assign your configuration to a statically declared struct, or check out

Re: How to access string in a module that is set in configuration directive?

2012-06-30 Thread ohaya
Sorin Manolache sor...@gmail.com wrote: On 2012-06-30 22:33, oh...@cox.net wrote: Hi, I got my 1st module working and now I need to add support for a configuration directive that sets a string that my module needs in various places, i.e., if my directive is SetMyVar, and

Re: Module register_hooks and config seems to be called twice when Apache starts up?

2012-07-01 Thread ohaya
Eric Covener cove...@gmail.com wrote: On Sun, Jul 1, 2012 at 11:48 AM, oh...@cox.net wrote: Hi, I have the following in my module: module AP_MODULE_DECLARE_DATA my_module = {     STANDARD20_MODULE_STUFF,     NULL,                                                  /* dir

Re: Best practices or recommendations for logging from a module?

2012-07-01 Thread ohaya
oh...@cox.net wrote: Hi, I'm working on my 1st module, and everything seems to be working so far. At this point, since it's a first module, and I've been doing lots of debugging, mostly running Apache in single process mode (-k start -X), I've only been using printf to output

Re: Best practices or recommendations for logging from a module?

2012-07-01 Thread ohaya
Joe Lewis jle...@silverhawk.net wrote: Jim, you could use the log_error funtion all the time. Log_perror javits logging associated with a pool, and log_rerror is for requests. If possible, use log_rerror, because it puts the up address, etc into the logs. Joe On Jul 1, 2012 10:56 AM,

Re: Best practices or recommendations for logging from a module?

2012-07-01 Thread ohaya
oh...@cox.net wrote: Joe Lewis jle...@silverhawk.net wrote: Jim, you could use the log_error funtion all the time. Log_perror javits logging associated with a pool, and log_rerror is for requests. If possible, use log_rerror, because it puts the up address, etc into the logs.

Re: Best practices or recommendations for logging from a module?

2012-07-01 Thread ohaya
oh...@cox.net wrote: oh...@cox.net wrote: Joe Lewis jle...@silverhawk.net wrote: Jim, you could use the log_error funtion all the time. Log_perror javits logging associated with a pool, and log_rerror is for requests. If possible, use log_rerror, because it puts

Re: Best practices or recommendations for logging from a module?

2012-07-01 Thread ohaya
Joe Lewis j...@joe-lewis.com wrote: On 07/01/2012 12:55 PM, oh...@cox.net wrote: oh...@cox.net wrote: oh...@cox.net wrote: Joe Lewisjle...@silverhawk.net wrote: Jim, you could use the log_error funtion all the time. Log_perror javits

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

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

Re: Apache 2.4.4 - undefined symbol: ap_log_rerror

2013-04-02 Thread ohaya
Hi Jeff et al, Thanks for responding. I was kind of afraid (but expected) that that'd be the situation :(... Yours, Jim Jeff Trawick traw...@gmail.com wrote: On Tue, Apr 2, 2013 at 3:21 AM, Ian B porj...@yahoo.com.au wrote: ap_log_rerror is part of the core libraries, see: