code into a single stack per handlers (for correct interleaving).
Changed the syntax so that now they are of the form
phpUriHandler /filename
phpUriHandlerMethod Class::Method
This now works for all handlers including response handlers.
declared in a phpRequire statemenet, of course, or be otherwise available
at the hook run-time (builtins)). This is currently only implemented
for the uri trans handler it is usable as:
phpUriHandlerCodeRef MyClass::MyMethod
This can be greatly robustified from whre it stands now, but is a good proof
of concept (hopefully!)
as class methods for the ApacheRequest objects. broke sapi_activate
into two functions to allow for reading of headers/cookies separately
from request bodies (POST stuff). Altered some of the send_headers code
in mod_php4.c to prevent sending headers twice (since a phpResponseHandler
needs to be able to have full freedom for setting headers using the
ap_*_header* functions.
order they are listed in the httpd.conf for a section. phpRequire is now supported (called out of the post-read request handler), and a first attempt at phpResponseHandler, a response-time type handler which is set by a
<Location blah>
SetHandler php-script
phpResponseHandler /tmp/foo.php
</Location>
To allow for the stacked handlers, the entirety of zend_stack.c was imported into mod_php4.c. There is a patch pending to zend_stack.c to add the functionality so that all the redundant code can be removed.
php_value uri_handler /tmp/foo.php
is now
phpUriHandler /tmp/foo.php
This fixes some bugs that caused handlers to be skipped or mysteriously 'unloaded',
reduces the number of calls to zend_alter_ini_entries that are necessary, as well
as allows for easier implementation of stacked handlers (which comes next).
Added 2 new hooks, phpPostReadHandler and phpHeaderHandler (going to the obvious places).
implemented, but the others will be easy once I finish the uri translation
example. The big things left to do is to create a proper $r request
object to be manipulated in user-space and also to verify that the hooks
don't steal the POST data such that it isn't available to the content
handler once it is finally called. Or if we do steal it, make sure it
is somehow available to the content handler later on.
Comments and help with this stuff is more than welcome. Check out these
files from the 'apache_hooks' branch to play along.