+++ /dev/null
-##
-## Makefile -- Build procedure for sample repoview Apache module
-## Autogenerated via ``apxs -n repoview -g''.
-##
-
-builddir=.
-top_srcdir=/usr/share/apache2
-top_builddir=/usr/share/apache2
-include /usr/share/apache2/build/special.mk
-
-# the used tools
-APACHECTL=apachectl
-
-# additional defines, includes and libraries
-#DEFS=-Dmy_define=my_value
-#INCLUDES=-Imy/include/dir
-#LIBS=-Lmy/lib/dir -lmylib
-
-# the default target
-all: local-shared-build
-
-# install the shared object file into Apache
-install: install-modules-yes
-
-# cleanup
-clean:
- -rm -f mod_repoview.o mod_repoview.lo mod_repoview.slo mod_repoview.la
-
-# simple test
-test: reload
- lynx -mime_header http://localhost/repoview
-
-# install and activate shared object by reloading Apache to
-# force a reload of the shared object file
-reload: install restart
-
-# the general Apache start/restart/stop
-# procedures
-start:
- $(APACHECTL) start
-restart:
- $(APACHECTL) restart
-stop:
- $(APACHECTL) stop
-
+++ /dev/null
-/*
-** mod_repoview.c -- Apache sample repoview module
-** [Autogenerated via ``apxs -n repoview -g'']
-**
-** To play with this sample module first compile it into a
-** DSO file and install it into Apache's modules directory
-** by running:
-**
-** $ apxs -c -i mod_repoview.c
-**
-** Then activate it in Apache's apache2.conf file for instance
-** for the URL /repoview in as follows:
-**
-** # apache2.conf
-** LoadModule repoview_module modules/mod_repoview.so
-** <Location /repoview>
-** SetHandler repoview
-** </Location>
-**
-** Then after restarting Apache via
-**
-** $ apachectl restart
-**
-** you immediately can request the URL /repoview and watch for the
-** output of this module. This can be achieved for instance via:
-**
-** $ lynx -mime_header http://localhost/repoview
-**
-** The output should be similar to the following one:
-**
-** HTTP/1.1 200 OK
-** Date: Tue, 31 Mar 1998 14:42:22 GMT
-** Server: Apache/1.3.4 (Unix)
-** Connection: close
-** Content-Type: text/html
-**
-** The sample page from mod_repoview.c
-*/
-
-#include "httpd.h"
-#include "http_config.h"
-#include "http_protocol.h"
-#include "ap_config.h"
-
-/* The sample content handler */
-static int repoview_handler(request_rec *r)
-{
- if (strcmp(r->handler, "repoview-handler")) {
- return DECLINED;
- }
- r->content_type = "text/html";
-
- if (!r->header_only)
- ap_rputs("The sample page from mod_repoview.c\n", r);
- return OK;
-}
-
-static void repoview_register_hooks(apr_pool_t *p)
-{
- ap_hook_handler(repoview_handler, NULL, NULL, APR_HOOK_MIDDLE);
-}
-
-/* Dispatch list for API hooks */
-module AP_MODULE_DECLARE_DATA repoview_module = {
- STANDARD20_MODULE_STUFF,
- NULL, /* create per-dir config structures */
- NULL, /* merge per-dir config structures */
- NULL, /* create per-server config structures */
- NULL, /* merge per-server config structures */
- NULL, /* table of config file commands */
- repoview_register_hooks /* register hooks */
-};
-