Created
December 12, 2008 13:28
-
-
Save lifo/35124 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
apxs -c mod_helloworld.c | |
LoadModule helloworld_module modules/mod_helloworld.so | |
<Location /helloworld> | |
SetHandler helloworld | |
</Location> | |
*/ | |
#include <httpd.h> | |
#include <http_protocol.h> | |
#include <http_config.h> | |
static const char *response = "doesnt scale"; | |
static int helloworld_handler(request_rec *r) | |
{ | |
ap_rputs(response, r); | |
return OK; | |
} | |
static void helloworld_hooks(apr_pool_t *pool) | |
{ | |
ap_hook_handler(helloworld_handler, NULL, NULL, APR_HOOK_MIDDLE); | |
} | |
module AP_MODULE_DECLARE_DATA helloworld_module = { | |
STANDARD20_MODULE_STUFF, | |
NULL, | |
NULL, | |
NULL, | |
NULL, | |
NULL, | |
helloworld_hooks | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment