]> granicus.if.org Git - apache/commitdiff
xforms
authorDaniel Gruno <humbedooh@apache.org>
Thu, 19 Jul 2012 06:16:34 +0000 (06:16 +0000)
committerDaniel Gruno <humbedooh@apache.org>
Thu, 19 Jul 2012 06:16:34 +0000 (06:16 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1363230 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/developer/modguide.html.en
docs/manual/howto/cgi.html.en
docs/manual/howto/cgi.html.fr
docs/manual/howto/cgi.xml.fr
docs/manual/howto/cgi.xml.ja
docs/manual/howto/cgi.xml.ko
docs/manual/howto/cgi.xml.meta

index 20e79b102daa76b3b3bab16f52ebba522a1b3077..58383274116af054c302317a50375eba2496833f 100644 (file)
@@ -41,7 +41,7 @@ Server 2.4</p>
 <h2><a name="introduction" id="introduction">Introduction</a></h2>
 <h3><a name="what" id="what">What we will be discussing in this document</a></h3>
 <p>
-This document will discuss how you can easily create modules for the Apache 
+This document will discuss how you can create modules for the Apache 
 HTTP Server 2.4, by exploring an example module called 
 <code>mod_example</code>. In the first part of this document, the purpose 
 of this module will be to calculate and print out various digest values for 
@@ -248,6 +248,8 @@ can create. Some other ways of hooking are:
 <li><code>ap_hook_pre_config</code>: Place a hook that executes before any configuration data has been read (very early hook)</li>
 <li><code>ap_hook_post_config</code>: Place a hook that executes after configuration has been parsed, but before the server has forked</li>
 <li><code>ap_hook_translate_name</code>: Place a hook that executes when a URI needs to be translated into a filename on the server (think <code>mod_rewrite</code>)</li>
+<li><code>ap_hook_quick_handler</code>: Similar to <code>ap_hook_handler</code>, except it is run before any other request hooks (translation, auth, fixups etc)</li>
+<li><code>ap_hook_log_transaction</code>: Place a hook that executes when the server is about to add a log entry of the current request</li>
 </ul>
 
 
@@ -325,9 +327,10 @@ request_req </code> structure are:
 <li><code>r-&gt;args (char*):</code> Contains the query string of the request, if any</li>
 <li><code>r-&gt;headers_in (apr_table_t*):</code> Contains all the headers sent by the client</li>
 <li><code>r-&gt;connection (conn_rec*):</code> A record containing information about the current connection</li>
+<li><code>r-&gt;user (char*):</code> If the URI requires authentication, this is set to the username provided</li>
 <li><code>r-&gt;useragent_ip (char*):</code> The IP address of the client connecting to us</li>
-<li><code>r-&gt;pool (apr_pool_t*)</code>: The memory pool of this request. We'll discuss this in the "
-<a href="#memory">Memory management</a>" chapter.</li>
+<li><code>r-&gt;pool (apr_pool_t*)</code>: The memory pool of this request. We'll discuss this in the 
+"<a href="#memory">Memory management</a>" chapter.</li>
 </ul>
 <p>
 A complete list of all the values contained with in the <code>request_req</code> structure can be found in 
@@ -1313,10 +1316,11 @@ two configurations and decide how they are to be merged:</p>
 
 <pre class="prettyprint lang-c">
 void* merge_dir_conf(apr_pool_t* pool, void* BASE, void* ADD) {
-    example_config* base = (example_config *) BASE ;
-    example_config* add = (example_config *) ADD ;
-    example_config* conf = (example_config *) create_dir_conf(pool, "Merged configuration");
+    example_config* base = (example_config *) BASE ; /* This is what was set in the parent context */
+    example_config* add = (example_config *) ADD ;   /* This is what is set in the new context */
+    example_config* conf = (example_config *) create_dir_conf(pool, "Merged configuration"); /* This will be the merged configuration */
     
+    /* Merge configurations */
     conf-&gt;enabled = ( add-&gt;enabled == 0 ) ? base-&gt;enabled : add-&gt;enabled ;
     conf-&gt;typeOfAction = add-&gt;typeOfAction ? add-&gt;typeOfAction : base-&gt;typeOfAction;
     strcpy(conf-&gt;path, strlen(add-&gt;path) ? add-&gt;path : base-&gt;path);
@@ -1634,8 +1638,8 @@ keyValuePair* readPost(request_req* r) {
     if (res != OK || !pairs) return NULL; /* Return NULL if we failed or if there are is no POST data */
     kvp = apr_pcalloc(r-&gt;pool, sizeof(keyValuePair) * (pairs-&gt;nelts + 1));
     while (pairs &amp;&amp; !apr_is_empty_array(pairs)) {
-        ap_form_pair_t *pair = (ap_form_pair_t *) apr_array_pop(pairs);
         i++;
+        ap_form_pair_t *pair = (ap_form_pair_t *) apr_array_pop(pairs);
         apr_brigade_length(pair-&gt;value, 1, &amp;len);
         size = (apr_size_t) len;
         buffer = apr_palloc(r-&gt;pool, size + 1);
@@ -1658,7 +1662,7 @@ static int example_handler(request_req *r)
     if (formData) {
         int i;
         for (i = 0; formData[i]; i++) {
-            ap_rprintf(r, "%s == %s\n", formData[i]-&gt;key, formData[i]-&gt;value);
+            ap_rprintf(r, "%s = %s\n", formData[i]-&gt;key, formData[i]-&gt;value);
         }
     }
     return OK;
index fa00983a9b9e60f4824825ddbf6513f8d2c3f6d5..2c343515028694dbea1e2781524b58b7e1968173 100644 (file)
@@ -483,8 +483,11 @@ print "Hello, World.";
 
       <pre class="prettyprint lang-perl">
 #!/usr/bin/perl
+use strict;
+use warnings;
+
 print "Content-type: text/html\n\n";
-foreach $key (keys %ENV) {
+foreach my $key (keys %ENV) {
     print "$key --&gt; $ENV{$key}&lt;br&gt;";
 }
       </pre>
index b40278e82aae6f948238cb854178288c3c4aa4b8..e4d672b8c5330fa9f9bb2dcce13e01467d4073c6 100644 (file)
@@ -26,6 +26,8 @@
 <a href="../ja/howto/cgi.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
 <a href="../ko/howto/cgi.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
 </div>
+<div class="outofdate">Cette traduction peut être périmée. Vérifiez la version
+            anglaise pour les changements récents.</div>
 </div>
 <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#intro">Introduction</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#configuring">Configurer Apache pour autoriser CGI</a></li>
index a87c3de58a9a96d5d96ab310dfdd157363cb6870..a87b9cf9b77f45949cbed0cad84f1831d817e277 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
-<!-- English Revision : 1333989 -->
+<!-- English Revision: 1333989:1363228 (outdated) -->
 <!-- French translation : Lucien GENTIS -->
 <!-- Reviewed by : Vincent Deffontaines -->
 
index 32cc66b67b22054ed4ed76638b8a9b76dffc1a06..07dbb764fcb453bfe59ca8c67e4335a508bba3b3 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
-<!-- English Revision: 545841:1333989 (outdated) -->
+<!-- English Revision: 545841:1363228 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index c3e0ab3346403fa5d85b16957b58dd13c6307d9a..f5fc8c8b8d71878061c20715b014ebbcbe773e50 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0' encoding='EUC-KR' ?>
 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?>
-<!-- English Revision: 105989:1333989 (outdated) -->
+<!-- English Revision: 105989:1363228 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more
index 3070905d45bbb0cd28a5b8ae2dda9692758eba3b..73144f6d4d2bac3cb8c15958a1144449e878f623 100644 (file)
@@ -8,7 +8,7 @@
 
   <variants>
     <variant>en</variant>
-    <variant>fr</variant>
+    <variant outdated="yes">fr</variant>
     <variant outdated="yes">ja</variant>
     <variant outdated="yes">ko</variant>
   </variants>