]> granicus.if.org Git - apache/commitdiff
Expand on how to set context specific directives. Also fix some typos
authorDaniel Gruno <humbedooh@apache.org>
Mon, 29 Apr 2013 12:22:38 +0000 (12:22 +0000)
committerDaniel Gruno <humbedooh@apache.org>
Mon, 29 Apr 2013 12:22:38 +0000 (12:22 +0000)
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

index da0b0eb7c13ea592979d1d4b0f1874a64dfea8e6..3acb28030672bf73e556521880bbcf8c627940e3 100644 (file)
@@ -304,7 +304,7 @@ looks like
 <p>The most essential part of any request is the <em>request record
 </em>. In a call to a handler function, this is represented by the <code>
 request_rec* </code> structure passed along with every call that is made. 
-This struct, typically just refered to as <code>r</code> in modules, 
+This struct, typically just referred to as <code>r</code> in modules, 
 contains all the information you need for your module to fully process any 
 HTTP request and respond accordingly.</p> <p>Some key elements of the <code>
 request_rec </code> structure are:
@@ -709,7 +709,7 @@ static int example_handler(request_rec *r)
 <!-- END EXAMPLE CODE -->
 
 <p>
-This version in its entirity can be found here: 
+This version in its entirety can be found here: 
 <a href="http://people.apache.org/~humbedooh/mods/examples/mod_example_2.c">mod_example_2.c</a>.
 </p>
 </section>
@@ -892,7 +892,7 @@ set them.</em>)
 </section>
 <section id="directive_handler"><title>The directive handler function</title>
 <p>
-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 <code>ACCESS_CONF</code>, which lets us use 
-the directive inside &lt;Directory&gt; and &lt;Location&gt; blocks.
+the directive inside &lt;Directory&gt; and &lt;Location&gt; blocks. For more 
+control over the placement of your directives, you can combine the following 
+restrictions together to form a specific rule:
 </p>
+<ul>
+<li><code>RSRC_CONF</code>: Allow in .conf files (not .htaccess) outside &lt;Directory&gt; or &lt;Location&gt;</li>
+<li><code>ACCESS_CONF</code>: Allow in .conf files (not .htaccess) inside &lt;Directory&gt; or &lt;Location&gt;</li>
+<li><code>OR_OPTIONS</code>: Allow in .conf files and .htaccess when <code>AllowOverride Options</code> is set</li>
+<li><code>OR_FILEINFO</code>: Allow in .conf files and .htaccess when <code>AllowOverride FileInfo</code> is set</li>
+<li><code>OR_AUTHCFG</code>: Allow in .conf files and .htaccess when <code>AllowOverride AuthConfig</code> is set</li>
+<li><code>OR_INDEXES</code>: Allow in .conf files and .htaccess when <code>AllowOverride Indexes</code> is set</li>
+<li><code>OR_ALL</code>: Allow anywhere in .conf files and .htaccess</li>
+</ul>
 </section>
 
 <section id="context_pool"><title>Using the server to allocate configuration slots</title>
@@ -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++) {