Re: Module portability

2021-12-09 Thread Sorin Manolache
On 09/12/2021 02.58, miim wrote: I am not sure if this is a question for this list or for the APR forum, but it seems to me that this forum is more likely to have an answer. To what extent can I expect a module compiled on system A to be portable to system B: -- if both are running the same

Re: Chasing a segfault, part II

2021-10-26 Thread Sorin Manolache
On 26/10/2021 08.18, miim wrote: ua_pointer = apr_table_get(r->headers_in, "User-Agent"); /* Find out how long the Apache-supplied string is */ ualength = strlen(ua_pointer); If the request does not contain any user-agent then ua_pointer will be NULL. strlen of NULL will segfault.

Re: Chasing a segfault

2021-10-23 Thread Sorin Manolache
On 23/10/2021 02.49, miim wrote: I have a relatively simple module which is nonetheless causing Apache to intermittently segfault. I've added debugging trace messages to be sent to the error log, but the lack of anything in the log at the time of the segfault leads me to think that the error

Re: IPv4 vs IPv6 addressing

2021-09-15 Thread Sorin Manolache
On 15/09/2021 02.22, miim wrote: Sorin, thank you. I now have a small chunk of code that appears to do the job. I do not have access to an IPv6 system to test with but it does identify the connection type correctly on my IPv4 system. I am not sure what APR_UNIX is, but it is referenced in

Re: IPv4 vs IPv6 addressing

2021-09-14 Thread Sorin Manolache
On 14/09/2021 04.58, miim wrote: I've reviewed the last three years of the list and I can't find a commentary on this issue, nor was I able to find one on goofle. Consider an incoming request which might have either an IPv4 or an IPv6 address. The module wants to know which one. It is

Re: What is the best way of reading of post request body at hooks module from 2 hooks procedures (+) ?

2020-05-18 Thread Sorin Manolache
body in the first callback. HTH, Sorin вс, 17 мая 2020 г. в 10:32, Sorin Manolache : On 15/05/2020 23.39, CpServiceSPb . wrote: I write hook module for Apache2 consisted of hooks of 2 procedures: ap_hook_check_authn/ap_hook_check_user_id and ap_hook_handler. This module reads content of post

Re: What is the best way of reading of post request body at hooks module from 2 hooks procedures (+) ?

2020-05-17 Thread Sorin Manolache
On 15/05/2020 23.39, CpServiceSPb . wrote: I write hook module for Apache2 consisted of hooks of 2 procedures: ap_hook_check_authn/ap_hook_check_user_id and ap_hook_handler. This module reads content of post method request, mainly body, and extract necessary information for functioning of the

Re: Testing module without Apache

2019-11-02 Thread Sorin Manolache
On 02/11/2019 11.00, Ervin Hegedüs wrote: Hi, this is just a theoretical question: is there any way to test/use an Apache module without Apache?n Hello, AFAIK no, but I didn't research it much. There are however best practices that try to come as close as possible to a "reasonable" degree

Re: Is it safe to stop reading a bucket brigade in an input filter before the end?

2019-05-19 Thread Sorin Manolache
On 16/05/2019 00.26, Paul Callahan wrote: I have an apache body filter that copies off data from the incoming request. But I terminate the reading of the data if the size of the accumulated data is over some limit. This is my function, it just breaks out of the loop when the max is read.

Re: request_rec.unparsed_uri missing scheme and host. parsed_uri missing most fields

2019-05-14 Thread Sorin Manolache
On 14/05/2019 20.35, Paul Callahan wrote: Hello, I'm having trouble getting the full uri of a request from request_rec. The comment string for request_rec.unparsed_uri makes it sound like it should have the entire url, e.g. http:://hostname/path?etc. But it only has the path and the query

Re: Modul command directive arguments

2019-04-16 Thread Sorin Manolache
On 15/04/2019 22.39, Ervin Hegedüs wrote: Hi, I'm playing with a module, and found an interesting function. Example: const command_rec module_directives[] = { ... AP_INIT_TAKE23 ( "DirectiveCmd", cmd, NULL, CMD_SCOPE_ANY, "Directive

Re: How to read data in a request handler and then return DECLINED without consuming the data in the bucket brigade?

2018-06-04 Thread Sorin Manolache
On 2018-06-04 08:27, Paul Callahan wrote: In apache modules, my understanding is if a handler declines a request, the request is passed on to the next suitable handler. I'm finding though if I read the bucket_brigade/request body, and then decline the request, the subsequent handler doesn't

Re: How to create ssl backend connections in a module?

2017-06-29 Thread Sorin Manolache
On 2017-06-29 19:36, Christoph Rabel wrote: Hi, I have written an apache module that sometimes connects to a backend server. Currently it does that through http, open a socket, send a get request, get a response, process it. Nothing special. Now we need to support https too and I am wondering,

Re: modify request_rec->args

2016-03-25 Thread Sorin Manolache
On 2016-03-25 00:59, Justin Kennedy wrote: Hello, I have a simple module, with just a quick_hander, it's sole function is to check if there is a specific key=value on the query string, and modify the value, so it gets picked up by a separate module. For example: if "foo=1" is in r->args, then

Re: apr_shm_create succeeds then fails on Mac OS X

2015-12-27 Thread Sorin Manolache
On 2015-12-25 19:36, Tapple Gao wrote: Hi. I’m trying to get mod_tile working on the builtin apache in Mac OS X El Capitan. I am running into a problem with apr_shm_create failing to allocate memory during ap_hook_post_config: [Fri Dec 25 12:09:17.898197 2015] [tile:error] [pid 22431]

Re: Apache add content-length

2015-12-09 Thread Sorin Manolache
On 2015-12-09 15:02, Pechoultres Xavier wrote: Hi everybody, I wrote an apache (2.2.x) module for special c++ app. It works fine for many years but a problem resist to me. Apache automatically add a content-length header even I send a Transfer-Encoding: chunked I set

Re: Tracking sent responses

2015-11-06 Thread Sorin Manolache
On 2015-11-06 15:12, Julien FROMENT wrote: Hello, We would like to use Apache HTTP Server to keep track of exactly what part of the response was sent over a socket. Apache could call an API asynchronously with the number of bytes sent over the socket for a given request. Here is the pseudo

Re: server directives are lost when activating module in vhost

2015-10-21 Thread Sorin Manolache
On 2015-10-21 15:45, Justin Kennedy wrote: Greetings, I have these two directives specified in the root httpd.conf: ServerTokens Prod ServerSignature Off Those directives are being honored and all is well, until I activate my module within a virtual host. Once that happens, these directives

Re: graceful child process exit

2015-09-21 Thread Sorin Manolache
On 2015-09-21 00:45, Massimo Manghi wrote: Hi, I'm working on an issue with mod_rivet, a content generator module that embeds in Apache the interpreter of the Tcl scripting language. I won't bother you with the details of the problem (but if anyone is interested I'm ready to answer any

Re: Best practice for handling synchronous signals SIGFPE etc

2015-04-20 Thread Sorin Manolache
On 2015-04-20 21:50, Mark Taylor wrote: I found that ./server/mpm_unix.c is registering a handler (sig_coredump) for SIGFPE, SIGSEGV, and other synchronous signals. I'd like to handle at least these two in my module, using my own handler. But then how do I determine if the the handler is

Re: Mod_proxy is truncating Response Header size

2014-11-26 Thread Sorin Manolache
On 2014-11-26 13:46, KPONVI Komlan (EXT) wrote: Hi everyone , I am having an issue with mod_proxy. I have to forward request to a server which add a header into the response. The size of that header is higher than 8k, and i notice that mod_proxy truncate that header before forward back the

Re: output filter needs to redirect to 503 error status

2014-10-16 Thread Sorin Manolache
On 2014-10-16 15:36, Eric Johanson wrote: Hi, I have an output filter module which is working just fine, but I need to add a feature so that when certain error conditions occur during processing, the output filter hook function redirects the whole request to a 503 error status (service

Re: output filter needs to redirect to 503 error status

2014-10-16 Thread Sorin Manolache
: Sorin Manolache [mailto:sor...@gmail.com] Sent: Thursday, October 16, 2014 12:59 PM To: modules-dev@httpd.apache.org Subject: Re: output filter needs to redirect to 503 error status On 2014-10-16 15:36, Eric Johanson wrote: Hi, I have an output filter module which is working just fine, but I need

Re: Sharing information across Apache child processes

2014-09-29 Thread Sorin Manolache
On 2014-09-29 13:39, Rajalakshmi Iyer wrote: Hello, I have a requirement whereby my application's configuration information (comprising a few complex data structures) needs to be shared across the various Apache child processes. Currently, the configuration is being individually loaded by each

Re: apr_hash_t and global scope

2013-12-11 Thread Sorin Manolache
On 2013-12-11 19:17, Ingo Walz wrote: Hello modules-dev! I've encountered a problem with an apr_hash_t in the global scope of my module. Let me explain the use-case a bit. Every time, when an asset (image e.g.) is delivered via apache, it stores meta information of that file with a simple

Re: response handling inside ap_hook_create_request cb function

2013-09-27 Thread Sorin Manolache
to intercept these and add my handling(ideally write something on the socket on which the message came and be done with the request while keeping the connection persistent unless the message was a control frame to close). Regards, Umapathy On Fri, Sep 27, 2013 at 12:29 PM, Sorin Manolache sor

Re: How to determine the right vhost in name based vhosting

2013-09-24 Thread Sorin Manolache
On 2013-09-24 11:38, Christoph Gröver wrote: Hello list, Hello Sorin, I tested several different Apaches (2.4.x and 2.2.x) and they never did the wanted or expected. If I configure more than one VHost only the first one is returned by the server-server_hostname structure. The one of the

Re: How to determine the right vhost in name based vhosting

2013-09-24 Thread Sorin Manolache
On 2013-09-24 13:04, Christoph Gröver wrote: Hello Sorin, I suppose you use the server field of the request_rec structure and not some stored server_rec that was passed to you in post_config or somewhere else. Definitely. I have adopted this from some other module and didn't know there was

Re: Browser cookie and Apache server calls

2013-06-27 Thread Sorin Manolache
, then force it directly in your module (apr_table_set(r-headers_out, Cache-Control, must-revalidate, no-cache); apr_table_set(r-err_headers_out, Cache-Control, must-revalidate, no-cache);) Sorin On Thu, Jun 27, 2013 at 2:25 AM, Sorin Manolache sor...@gmail.com wrote: On 2013-06-26 22:22

Re: Browser cookie and Apache server calls

2013-06-26 Thread Sorin Manolache
On 2013-06-26 22:22, Sindhi Sindhi wrote: Hi, I have a C++ Apache filter module for HTML output filtering. I'm seeing a certain behavior when using my filter module after setting cookies and would want to know if thats expected. I have a html page index.html, this page has a hyperlink called

Re: Mutex protection of output bucket brigade

2013-06-12 Thread Sorin Manolache
On 2013-06-12 11:48, Alex Bligh wrote: On 12 Jun 2013, at 10:20, Sorin Manolache wrote: If I understand correctly, the main thread belongs to your module, i.e. it is not a concise pseudo-code of the request processing in apache's code. The main thread is the (presumably single) thread

Re: Mutex protection of output bucket brigade

2013-06-12 Thread Sorin Manolache
On 2013-06-12 14:16, Alex Bligh wrote: But that aside, is it safe to call apwrite() from one thread whilst there's a read in the other? I do not know for sure, but I suppose it is not safe if both the read and the write operate on the same brigade. I'm not calling ap_pass_brigade (at

Re: thread safety and mpm-prefork

2013-06-11 Thread Sorin Manolache
On 2013-06-11 21:20, Alex Bligh wrote: I've written a module which I believe to be thread-safe but appears to be doing something which I have put down to a lack of thread safety in pool management (somewhere). Before I tear my hair out here, my module is running with apache 2.2.22 and

Re: Apache pool management

2013-05-25 Thread Sorin Manolache
On 2013-05-25 10:05, Sindhi Sindhi wrote: You have answered all my questions and thanks a lot. Had two questions more, appreciate your response. 1. As of now, my httpd.conf file has the below lines- # Server-pool management (MPM specific) #Include conf/extra/httpd-mpm.conf This means Apache

Re: Get name of config file for module

2013-05-22 Thread Sorin Manolache
21, 2013 at 2:32 PM, Sorin Manolache sor...@gmail.com wrote: On 2013-05-21 21:36, Sean Beck wrote: Hi all, I have written a module and now would like to log the name of the actual config file being used by the module (there will be multiple modules on the server with their own config files. I

Re: C++ Apache module fails to load

2013-05-11 Thread Sorin Manolache
On 2013-05-11 08:35, Sindhi Sindhi wrote: Hello, I have created a C++ Apache module that performs text filtering operations. I used Visual Studio 2010 to build/compile the source code to generate the DLL. I have Apache httpd-2.4.4-win64 installed from

Re: Apache C++ equivalent of javax.servlet.Filter

2013-05-01 Thread Sorin Manolache
On 2013-05-01 12:21, Sindhi Sindhi wrote: Hi, I'm developing a C++ module for Apache(httpd.exe) server. This C++ module intends to function the same as a Java module that we earlier developed for Tomcat. I'll be very thankful to you if you could answer the following queries I have about finding

Re: Apache Buckets and Brigade

2013-05-01 Thread Sorin Manolache
On 2013-05-01 14:54, Sindhi Sindhi wrote: Hello, Thanks a lot for providing answers to my earlier emails with subject Apache C++ equivalent of javax.servlet.Filter. I really appreciate your help. I had another question. My requirement is something like this - I have a huge html file that I

Re: retrieving module configs from other modules

2013-04-16 Thread Sorin Manolache
On 2013-04-15 23:12, Tim Traver wrote: Hi all, is there a way to access the module config tables of another module? For instance, if I want to see (from my module) what the path to the SSL cert is in the ssl_module, how can I go about doing that? And are there any tutorials on how to retrieve

Re: How to control block size of input_filter data

2013-03-12 Thread Sorin Manolache
at that state ? Best, Vu On 03/12/2013 10:36 AM, Sorin Manolache wrote: On 2013-03-12 10:16, Hoang-Vu Dang wrote: Hi all, When I write an input_filter, I notice that the data sent from client is not always available in one chunk if it's large. In other words, The input_filter() function

Re: Read file file before web server startup

2012-11-12 Thread Sorin Manolache
On 2012-11-13 00:41, Idel Fuschini wrote: Hi, I need to read a configuration file (XML) and put dati in hash array before the webserver starts. It's possibile, if yes how ? You define a module configuration object using the create_server_config callback of your module structure. You define

Re: Forcing Apache to exit on startup

2012-10-22 Thread Sorin Manolache
On 2012-10-22 21:29, Joshua Marantz wrote: Hi, Our module has multiple confirmation parameters. There is a case where if you have option A and option B, then you must also specify option C, otherwise Bad things can happen that are a lot easier to debug on startup than they are after the server

Re: Close HTTP connection callback/hook

2012-10-16 Thread Sorin Manolache
On 2012-10-16 15:50, Evgeny Shvidky wrote: Hi, I am implementing a new module on C. I need to perform some functionality when a user closes a HTTP connection before he received any response for his request. How can I know when a HTTP user request state has been changed/closed? Is there any

Re: Modules Communicating

2012-08-22 Thread Sorin Manolache
On 2012-08-22 09:31, Adi Selitzky wrote: Hi! I am writing my own module that handles all incoming requests. In some cases, I want this request to be handled by mod_python which I installed. In these cases, my module should change the requested file extension to .py, which is configured to be

Re: strange behaviour using mod_proxy when the r-filename partially overlaps the requested uri

2012-08-21 Thread Sorin Manolache
On 2012-08-21 13:39, nik600 wrote: static int kcache_handler_translate(request_rec* r) { if (r-method_number != M_GET r-method_number != M_POST){ return HTTP_METHOD_NOT_ALLOWED; } if( strstr(r-unparsed_uri, /files/anteprima)==NULL){

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

2012-06-30 Thread Sorin Manolache
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 httpd.conf has: SetMyVarfoo123 then, in my module, I

Re: Confused about modules processing order...

2012-06-26 Thread Sorin Manolache
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 insert_filter hook to inject an additional header into the

Re: Confused about modules processing order...

2012-06-26 Thread Sorin Manolache
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, working. The changes that I did to the original source were

Re: Confused about modules processing order...

2012-06-26 Thread Sorin Manolache
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 than webgate's check_user_id or auth_checker. (You have to hook one of the hooks (1)-(4).) There, in your hook, you have to get yourself the values of

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

2012-06-26 Thread Sorin Manolache
On 2012-06-26 22:17, oh...@cox.net wrote: Sorin Manolachesor...@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 than webgate's check_user_id or auth_checker. (You have to

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

2012-06-23 Thread Sorin Manolache
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 with a 3rd party library, so just for my module, which

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

2012-06-22 Thread Sorin Manolache
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 C++ on a regular basis and they interact with other

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

2012-06-21 Thread Sorin Manolache
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]# ./compile-mod-headers.sh /apps/httpd/build/libtool --silent --mode=compile gcc -prefer-pic

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

2012-06-21 Thread Sorin Manolache
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 and inspect the backtrace. Compiling with debug symbols

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

2012-06-21 Thread Sorin Manolache
On 2012-06-21 22:22, oh...@cox.net wrote: [root@apachemodule bin]# gdb httpd GNU gdb Red Hat Linux (6.3.0.0-1.162.el4rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it

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

2012-06-21 Thread Sorin Manolache
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 listing of source code in a different panel. S

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

2012-06-18 Thread Sorin Manolache
On 2012-06-18 08:53, oh...@cox.net wrote: Hi, I'll look at ssl_var_lookup a little later, but I'm still messing around with mod_headers.c, tweaking it to understand how THAT is working :)... I added a call to header_request_env_var(r, REMOTE_URI), just to see what it got (running Apache in

Re: Protocol converter module

2012-06-05 Thread Sorin Manolache
On 2012-06-05 13:47, Robert Mitschke wrote: How do I go about implementing this select. I have searched through the code but could not find out a way to actually get a handle to the socket. In the code all that is handled are network buckets. How would I gain access to the socket handle in

Re: Windows service startup configuration - how to find out the working process?

2012-04-25 Thread Sorin Manolache
On 04/26/12 00:03, Waldemar Klein wrote: Hello. Looking at the startup procedure of Apache on Windows (as service), I noticed that the httpd.conf is read and processed (i.e. procedures ran) in total 4 times. After startup, only one of them is actually used later to handle requests. I have a

Re: Calling another URL from output filter

2012-03-05 Thread Sorin Manolache
On 2012-03-04 19:19, Swaminathan Bhaskar wrote: Hello, How can I call another url from an output filter - here is the scenario: when a client accesses abc.mydomain.com/signon, this url autheticates the user and we dont want the response going back to the client rather call another url

Re: thread ID

2012-03-01 Thread Sorin Manolache
On 03/02/12 00:21, Ben Noordhuis wrote: On Thu, Mar 1, 2012 at 17:29,sorin.manola...@orange.com wrote: Hello, I would need a memory buffer associated per worker thread (in the worker MPM) or to each process (in the prefork MPM). In order to do that, I would need a map thread-buffer. So, I

Re: about setting r-headers_out

2012-02-29 Thread Sorin Manolache
On 02/29/12 07:52, Rui Hu wrote: hi, I want to set Content-Type and Cache-Control fields in my private module. So I hooked fixups and used apr_table_setn to set r-headers_out but nothing happened. Was it thought through? Thanks for you help! Try to set r-err_headers_out. For content-type

Re: Threads and signals in a module

2012-02-29 Thread Sorin Manolache
On 2012-02-28 22:05, Ben Rockefeller wrote: Hello, I have a module which creates a thread using pthread_create and then registers for SIGRTMIN+4 signal from another process. Problem is I do not see a signal callback when the signal is sent to me. I only see it when I try to kill apache where

Re: basic example shared memory code

2011-11-22 Thread Sorin Manolache
On Tue, Nov 22, 2011 at 21:25, Oğuzhan TOPGÜL oguzhantop...@gmail.com wrote: hey guys, i'm in terrible with these shared memory. I tried to write a basic module by looking at the examples that basic module just holds a counter and prints it to the client. when i compile the code attached, i

Re: Apache shared memory implementation

2011-11-16 Thread Sorin Manolache
On Wed, Nov 16, 2011 at 21:03, Pranesh Vadhirajan vadhira...@teralogics.com wrote: Hello Everyone, I am trying to understand how to implement sharing of objects in memory between various processes in apache.  I have been using the routines defined in sys/mman.h to implement the shared

Re: mod_proxy retry

2011-11-04 Thread Sorin Manolache
On Fri, Nov 4, 2011 at 01:18, Jodi Bosa jodib...@gmail.com wrote: thanks but unfortunately it seems mod_include #include virtual does not appear to support requests to external servers (must not contain a scheme or hostname - only path and query string). Regardless, I also tried

Re: Developing Authn/Authz Modules

2011-10-03 Thread Sorin Manolache
On Sat, Oct 1, 2011 at 23:05, Suneet Shah suneetshah2...@gmail.com wrote: Hello, I am trying to build my apache module which needs to carry out authentication and authorization functions based on the value of a cookie. To start with, I have just created a shell with the intent that I wanted

Re: Question on sub requests and output filter context.

2011-09-18 Thread Sorin Manolache
On Thu, Sep 15, 2011 at 12:52, Martin Townsend martin.towns...@power-oasis.com wrote: Hi, I have an output filter that parses custom tags to retrieve data from an application running on the same device. Everything was working well until I tried to move some HTML into Server Side Include

Re: My first Apache module!

2011-08-25 Thread Sorin Manolache
On Wed, Aug 24, 2011 at 23:59, Chris London ch...@kwista.com wrote: Hey everyone, I don't like to bother mailing lists with beginner questions so I spent a few hours on Google looking for info and tutorials. I'm sure at least one of you has had that experience :) Anyway, I have finished my

Re: ? symbol in the URL for ProxyPass

2011-08-19 Thread Sorin Manolache
On Fri, Aug 19, 2011 at 15:29, Denys dhryvas...@serena.com wrote: Hello - I am trying to use Apache Server as a proxy server for my applications. I try to make the following mappings: ProxyPass       /test/pass1/  http://localhost:80/denys/denys.dll? ProxyPass       /test/pass2/  

Re: How to test if request has been aborted

2011-07-30 Thread Sorin Manolache
On Sat, Jul 30, 2011 at 01:02, Tony Abo t...@hitech.com wrote: On Fri, Jul 29, 2011 at 02:35, Tony Abo t...@hitech.com wrote:  I need to cut the processing short if the user decides to press the stop button on the browser. I cant seem to figure out how to test for that condition from

Re: How to test if request has been aborted

2011-07-29 Thread Sorin Manolache
On Fri, Jul 29, 2011 at 02:35, Tony Abo t...@hitech.com wrote:  I need to cut the processing short if the user decides to press the stop button on the browser. I cant seem to figure out how to test for that condition from inside the handler. Can anyone help me? Thanks in advance, Tony

Re: Finding out original request's scheme

2011-07-21 Thread Sorin Manolache
On Thu, Jul 21, 2011 at 11:02, Ignaz Birnstingl ign...@gmail.com wrote: Hello, is there an easy way to find out a request's scheme part (i.e. http or https)? r-parsed_uri.scheme seems to be a null pointer. I currently iterate r-input_filters and check if filter-frec-name is ssl/tls filter

Re: Sharing information between threads and processes.

2011-07-21 Thread Sorin Manolache
On Thu, Jul 21, 2011 at 13:25, Zaid Amireh tum...@gmail.com wrote: On Jul 21, 2011, at 1:53 PM, Nick Kew wrote: Indirection in shared memory is inherently complex! How near do the socache modules come to meeting your needs? mod_disk_cache would unfortunately make my code pretty complex

proposed extension to mod_headers

2011-07-05 Thread Sorin Manolache
Hello, Some while ago I've posted a messages in which I enquired if there is a module that copies a slightly modified output header to a response. In particular, I wanted to set the same cookie on two domains in the same request. The content generator sets the cookie on one domain and I wanted

Re: input filters called again after Handler returns

2011-06-30 Thread Sorin Manolache
On Thu, Jun 30, 2011 at 02:56, Jodi Bosa jodib...@gmail.com wrote: I'm encountering a strange interaction between modules (including my own). When I track it down, it appears that input filters are called after the handler is finished which results in 2 bodies in the response. In other words,

Re: Module External Configuration

2011-06-21 Thread Sorin Manolache
On Tue, Jun 21, 2011 at 23:26, Jason Funk jasonlf...@gmail.com wrote: One last question about shared memory... I have my configuration now being loaded successfully into a shared memory segment.. now my problem is that someone could change the config so that the resulting structure wouldn't

Re: Module External Configuration

2011-06-20 Thread Sorin Manolache
On Mon, Jun 20, 2011 at 22:46, Jason Funk jasonlf...@gmail.com wrote: I have moved my configuration over to shared memory (following mod_shm_counter as an example) and it conceptually seems to be working. I am storing a struct in the memory and members that share it's memory (such as the last

Re: adding and editing response headers in conf

2011-06-16 Thread Sorin Manolache
On Thu, Jun 16, 2011 at 18:41, Joe Lewis jle...@silverhawk.net wrote: On Thu, 2011-06-16 at 12:32 -0400, Shawn Ligocki wrote: On Thu, Jun 16, 2011 at 11:57 AM, Joe Lewis jle...@silverhawk.net wrote: On Thu, 2011-06-16 at 17:46 +0200, Sorin Manolache wrote: Can I get this response

Re: Add a variable on http header

2011-06-06 Thread Sorin Manolache
On Mon, Jun 6, 2011 at 14:15, Maurizio Totti maurizio.to...@gmail.com wrote: Hi, I would try to set an http header variable on the fly but without success :-( I write this simple module to test the functionality http://pastebin.com/b8hcZTtb When running your code, I see USER_VAR2: mytest

Re: Add a variable on http header

2011-06-06 Thread Sorin Manolache
have lost :-( @Sorin Manolache @Simone Caruso: Ops... :-( It's correct now, but no change in my http response. I think that an AP_FTYPE_RESOURCE filter is invoked _after_ the HTTP response headers have been sent to the client. Try AP_FTYPE_PROTOCOL - 1 instead of AP_FTYPE_RESOURCE. S My

Re: cpu 100%

2011-03-31 Thread Sorin Manolache
--- HERE IS: #include httpd.h #include http_config.h #include http_protocol.h #include http_request.h #include http_log.h #include ap_compat.h #include apr_buckets.h

Re: cpu 100%

2011-03-31 Thread Sorin Manolache
On Thu, Mar 31, 2011 at 19:10, Niko Goutte ngou...@hotmail.com wrote: Date: Thu, 31 Mar 2011 18:22:34 +0200 Subject: Re: cpu 100% From: sor...@gmail.com To: modules-...@httpd.apache.org

Re: I don't understand apr_array_push

2011-01-26 Thread Sorin Manolache
In my opinion the problem is here: alias = (alias_t *)reqc-aliases-elts[k]; Try alias = ((alias_t *)reqc-aliases-elts)[k]; S On Wed, Jan 26, 2011 at 16:28, Simone Caruso i...@simonecaruso.com wrote: Hi list, i can't understand the reason i can't read from an apr array, my code is like

Re: I don't understand apr_array_push

2011-01-26 Thread Sorin Manolache
In my opinion the problem is here: alias = (alias_t *)reqc-aliases-elts[k]; Try alias = ((alias_t *)reqc-aliases-elts)[k]; Sorry alias = ((alias_t *)reqc-aliases-elts)[k]; or equivalently alias = ((alias_t *)reqc-aliases-elts) + k;

Re: Re: How to send a jpeg-file in Handler

2011-01-19 Thread Sorin Manolache
2011/1/19 Whut Jia whut_...@163.com: Hi Sorin Manolache, According your ways(ap_send_fd()),it is work.The picture is returned to client.But myself-set cookie content are not returned , why?? Begin sending jpg-file,I set a cookie in headers_out : r-content_type=image/jpeg; apr_table_setn(r

Re: Apache log modules

2010-11-30 Thread Sorin Manolache
On Mon, Nov 29, 2010 at 00:56, Andrej van der Zee andrejvander...@gmail.com wrote: Hi Sorin, Thanks for your reply. request_rec-connection-id is a long int that is unique. It is built from the process_id and thread_id of the apache thread that serves the request. Will this be unique for

Re: Howto unittest httpd modules?

2010-11-11 Thread Sorin Manolache
On Thu, Nov 11, 2010 at 08:11, Edgar Frank ef-li...@email.de wrote: Hi modules-dev-folks, I've written a handful of modules for httpd. I'm now looking for a way to setup some unit tests. We have continuous integration running, so I want to supply some tests, starting from compiling against

Re: How to init an mmaped file?

2010-10-26 Thread Sorin Manolache
On Tue, Oct 26, 2010 at 06:47, Mike Meyer mwm-keyword-apache.b9a...@mired.org wrote: On Tue, 26 Oct 2010 06:03:48 +0200 Ben Noordhuis i...@bnoordhuis.nl wrote: Mike, is your code available anywhere? Unfortunately, a lot of what happens after the connection is made is proprietary. I might be

Re: How to init an mmaped file?

2010-10-26 Thread Sorin Manolache
On Tue, Oct 26, 2010 at 20:36, Mike Meyer mwm-keyword-apache.b9a...@mired.org wrote: On Tue, 26 Oct 2010 10:03:11 +0100 Nick Kew n...@apache.org wrote: On 26 Oct 2010, at 03:52, Mike Meyer wrote: Anyone got some hints on how I ought to set this up? Maybe there's a writeup somewhere I

Re: add cookie in handler process

2010-09-19 Thread Sorin Manolache
2010/9/19 whut_jia whut_...@163.com: Hello, I am new to apache module development,and now I have a problem. Now,I am writing a handler module.In this module,I need validate username/password infomation sent by user.After validating,I set cookie into

Re: Problem with ap_internal_redirect_handler

2010-08-18 Thread Sorin Manolache
On Wed, Aug 18, 2010 at 14:24, Martin Townsend martin.towns...@power-oasis.com wrote:  Hi, I'm currently trying to add the ability to redirect requests for the initial html page to a captcha page when there is no session or no valid session.  Currently I'm doing this in the fixups hook:

Re: *** glibc detected *** double free or corruption (!prev) in cleanup function

2010-04-22 Thread Sorin Manolache
On Thu, Apr 22, 2010 at 05:47, Andrej van der Zee andrejvander...@gmail.com wrote: Hi, I have a question about apr_pool_cleanup_register for a child's pool. I register a cleanup function that is called when the pool is destroyed. In the cleanup function, I join a background thread that first

Re: Issuing a client side HTTP request from a module

2010-04-22 Thread Sorin Manolache
On Wed, Apr 21, 2010 at 22:51, Nick Kew n...@apache.org wrote: On 21 Apr 2010, at 20:42, Some Guy wrote: Hi all, Is there any facility in the Apache libs that allows module developers to act as a client? The usual way would be to harness mod_proxy, commonly in a subrequest. You don't

Re: LD_PRELOAD for modules

2010-03-27 Thread Sorin Manolache
On Sat, Mar 27, 2010 at 12:28, Andrej van der Zee andrejvander...@gmail.com wrote: Hi, Maybe a bit off-topic for this mailing list, but I need to do the same preload-trick for CGI applications written in C++. I was thinking about a wrapper bash-script that usese LD_PRELOAD in addition to a

Re: Using aprec in a handler to retrieve request body

2010-02-16 Thread Sorin Manolache
2010/2/16 Frédéric Laurendeau frederic.laurend...@gmail.com: Hi, I am trying to write a module which will get the request body, process it and write generated content in the response. I have seen that some of you used aprec to get the request body but I just cannot manage to build my module

Re: Using aprec in a handler to retrieve request body

2010-02-16 Thread Sorin Manolache
/mod_maquette.so cp: cannot stat `.libs/mod_maquette.so': No such file or directory apxs:Error: Command failed with rc=65536 2010/2/16 Sorin Manolache sor...@gmail.com 2010/2/16 Frédéric Laurendeau frederic.laurend...@gmail.com: Hi, I am trying to write a module which will get the request

Re: Using aprec in a handler to retrieve request body

2010-02-16 Thread Sorin Manolache
in mod_apreq2.so. Enable the module (LoadModule apreq2_module /path/to/mod_apreq2.so) and try again. S 2010/2/16 Sorin Manolache sor...@gmail.com 2010/2/16 Frédéric Laurendeau frederic.laurend...@gmail.com: Thanks for your help ! I tried it but it doesn't work, I get the following errors. /usr

Re: Using mod_rewrite in my authorization module. Need advice.

2010-02-03 Thread Sorin Manolache
By the way. The order in which the callbacks are called is translate_name, then authentication/authorisation and last fixups. If you put the RewriteRule at server level then it is applied during the translate_name callback. If you put it inside a Location directive, it is applied during the

Re: ErrorDocument and ProxyErrorOverride

2010-01-20 Thread Sorin Manolache
On Wed, Jan 20, 2010 at 01:54, Jeff Tharp jth...@esri.com wrote: That does fix this issue, but the browser still gets a 200 instead of a 404.   I know that's caused some confusion for our operation as well.  Think about SEO here -- we have a site behind an Apache-based reverse proxy.  We want

  1   2   >