Author: jhorwitz
Date: Fri Jul 22 11:09:18 2005
New Revision: 175
Modified:
mod_parrot/trunk/Makefile.in
mod_parrot/trunk/call_list.txt
mod_parrot/trunk/lib/Apache/RequestRec.imc
Log:
implement Apache::RequestRec::custom_response
Modified: mod_parrot/trunk/Makefile.in
==============================================================================
--- mod_parrot/trunk/Makefile.in (original)
+++ mod_parrot/trunk/Makefile.in Fri Jul 22 11:09:18 2005
@@ -47,7 +47,7 @@ test-clean:
t/conf/extra.conf t/conf/apache_test_config.pm t/TEST \
t/htdocs/index.html t/core.* nci_sig_test
-clean: files-clean libraries-clean test-clean
+clean: files-clean libraries-clean
distclean: clean test-clean
rm -f Makefile Makefile.old
Modified: mod_parrot/trunk/call_list.txt
==============================================================================
--- mod_parrot/trunk/call_list.txt (original)
+++ mod_parrot/trunk/call_list.txt Fri Jul 22 11:09:18 2005
@@ -14,3 +14,4 @@ i Jp
i Jpi
i JPip
t ptt
+v pit
Modified: mod_parrot/trunk/lib/Apache/RequestRec.imc
==============================================================================
--- mod_parrot/trunk/lib/Apache/RequestRec.imc (original)
+++ mod_parrot/trunk/lib/Apache/RequestRec.imc Fri Jul 22 11:09:18 2005
@@ -69,6 +69,9 @@ class, but is in no way tied to mod_perl
dlfunc func, nul, "ap_note_basic_auth_failure", "vp"
store_global "Apache::NCI", "ap_note_basic_auth_failure", func
+
+ dlfunc func, nul, "ap_custom_response", "vpit"
+ store_global "Apache::NCI", "ap_custom_response", func
.end
.sub __init method
@@ -586,6 +589,31 @@ Returns the the previous request if this
.pcc_end_return
.end
+=item C<custom_response(INT status, STRING response)>
+
+=over 4
+
+Set a custom response for a particular status. The response can be either a
+string to send back to the client or a URI.
+
+=back
+
+=cut
+
+.sub custom_response method
+ .param int status
+ .param string response
+ .local pmc r
+ .local pmc ap_custom_response
+ .local int offset
+
+ classoffset offset, self, 'Apache::RequestRec'
+ getattribute r, self, offset
+
+ find_global ap_custom_response, 'Apache::NCI', 'ap_custom_response'
+ ap_custom_response(r, status, response)
+.end
+
=back
=head1 AUTHOR
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.