Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Loss of binding between HTML FORM tag and request_rec |
|
Author |
|
milkgod
Joined: 31 Jul 2012 Posts: 2 Location: U.S.A., Boca Raton Florida
|
Posted: Wed 01 Aug '12 0:38 Post subject: Loss of binding between HTML FORM tag and request_rec |
|
|
Hello Everyone, and thanks in advance for your help and
kindness. I will try to post my source and other files
to pastebin.com
-- John
Question: Short of rebuilding from the source, must I *always* use apxs/perl/gcc for *any* third-party module development nowadays? I'm constrained to a "clean room" development environment where a minimum of software tools are permitted.
Motivation: All I want to do is incorporate a third-party module in C that responds to simple html POST and ACTION attributes embedded in the FORM tag.
Problem: Somewhere between processing the FORM tag inside my index.html and the request_rec passed to my module, my METHOD="POST" gets changed to "GET" and my ACTION="/program" is ignored. This can be shown by comparing my index.html with the webpage output below.
History: I had little trouble getting a clean build of my third-party module under MSVS2010 using the binary distribution of 2.2.22 downloaded recently from
apachelounge.com (httpd-2.2.22-win32-ssl_0.9.8.zip).
Years ago, I got third-party modules fully working over the web under Apache http Server 1.3.34 (using MSVC++6.0) without any other tools. The only difference I see between then and now, is that apxs might now be *required*, perhaps to update the Windows registry to enact the proper bindings???
Symptoms: Upon bringing up http://localhost/ in a web browser, the index.html gets skipped altogether, and the module's output is presented instead. That is, my third party module is always called unconditionally despite the settings to the contrary in my httpd.conf.
To rule out the possibility that the module is always initially 'probed' prior to eventually receiving a POST, I included a test inside the source code for the method 'POST', as customarily done when writing these modules (i.e., is this request for me?). In that case, index.html shows up, but clicking the Submit button does nothing, as should be expected. Therefore my module is not being probed, but always accessed exactly once, whether I like it or not.
Inside httpd.conf, directive '<Location "/program">' that guards my SetHandler directive is being ignored/bypassed. To show this, change "/program" (which matches my ACTION attribute in my html) to "/xyz", and the page generated by my module still comes up. In fact, commenting out the entire section guarded by the directive: '<IfModule hello_module>'
changes nothing: the generated page still comes up.
I ruled out the possibility that this behavior was the side effect of one or more other modules. Commenting out modules did not change this behavior except along the margins as documented in my attached httpd.conf.
Nothing unusual appears in the log files.
Hypotheses: This leaves open at least two possibilities: (i) The most likely possibility is that apxs performs certain under-the-hood bindings when installing a module. If that were the case, then this new requirement or dependency had been introduced since Version 1.3.34. (ii) Less likely, is the possibility of a bug in the currently mature and stable build of 2.2.22
Moderators Note: Removed a lot since it is all at the pastebin link below. |
|
Back to top |
|
milkgod
Joined: 31 Jul 2012 Posts: 2 Location: U.S.A., Boca Raton Florida
|
Posted: Wed 01 Aug '12 3:08 Post subject: pastebin link to stuff to reproduce my problem |
|
|
.. still stuck ..
but anyway, here's the unabridged code / log files / httpd.conf, etc. in pastebin:
http://pastebin.com/AJruMqUd
thx.
--John |
|
Back to top |
|
|
|
|
|
|