From 67b1b97518c7eab16559d7dbad5e0c214127bfcb Mon Sep 17 00:00:00 2001 From: Daniel Gruno Date: Mon, 29 Apr 2013 12:22:38 +0000 Subject: [PATCH] Expand on how to set context specific directives. Also fix some typos git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1476991 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/developer/modguide.xml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/docs/manual/developer/modguide.xml b/docs/manual/developer/modguide.xml index da0b0eb7c1..3acb280306 100644 --- a/docs/manual/developer/modguide.xml +++ b/docs/manual/developer/modguide.xml @@ -304,7 +304,7 @@ looks like

The most essential part of any request is the request record . In a call to a handler function, this is represented by the request_rec* structure passed along with every call that is made. -This struct, typically just refered to as r in modules, +This struct, typically just referred to as r in modules, contains all the information you need for your module to fully process any HTTP request and respond accordingly.

Some key elements of the request_rec structure are: @@ -709,7 +709,7 @@ static int example_handler(request_rec *r)

-This version in its entirity can be found here: +This version in its entirety can be found here: mod_example_2.c.

@@ -892,7 +892,7 @@ set them.)
The directive handler function

-Now that we've told the server to expect some directives for our module, it's +Now that we have told the server to expect some directives for our module, it's time to make a few functions for handling these. What the server reads in the configuration file(s) is text, and so naturally, what it passes along to our directive handler is one or more strings, that we ourselves need to @@ -1184,8 +1184,19 @@ AP_INIT_TAKE1("exampleEnabled", example_set_enabled, NULL, RSRC_CONF, "Enable or this directive in a global server context, but since we are now trying out a context aware version of our module, we should set this to something more lenient, namely the value ACCESS_CONF, which lets us use -the directive inside <Directory> and <Location> blocks. +the directive inside <Directory> and <Location> blocks. For more +control over the placement of your directives, you can combine the following +restrictions together to form a specific rule:

+
Using the server to allocate configuration slots @@ -1619,7 +1630,7 @@ static int example_handler(request_rec *r) keyValuePair* formData; /*~~~~~~~~~~~~~~~~~~~~~~*/ - formData = readPost(); + formData = readPost(r); if (formData) { int i; for (i = 0; formData[i]; i++) { -- 2.40.0