Index: overview.xml
===================================================================
--- overview.xml	(revision 45220)
+++ overview.xml	(working copy)
@@ -563,6 +563,75 @@
       </para>
             
     </section>
+
+    <section>
+      <title>CGI query parser</title>
+
+      <para>CGI stands for <firstterm>Common Gateway Interface</firstterm>. It
+        is designed to interface a client with a program running on a server via
+        a CGI query. Most often, the server is a web server and the query is
+        triggered by an HTML form.
+      </para>
+
+      <para>A CGI program is any program that can handle such a query. It is
+        thus meant to be run on the server and can be written in any language.
+        Its input will be a set of variables presented as key/value pairs using
+        the URL query format, and will be taken from the standard input (POST
+        method) or the environment (GET method). The cgi_query_parser retrieves
+        those variables for you, exactly the same way as it does from the
+        command line or a configuration file with other parsers.
+      </para>
+
+      <para>The cgi_query_parser can also work with queries that use the
+        multipart format (<code>enctype="multipart/form-data"</code> in an HTML
+        form), usually used to upload a file to the server. In this case, the
+        type specified for the option corresponding to the file has to be string
+        (specify <code>value&lt;string&gt;()</code> in the
+        &options_description;). The whole content of the file will then be
+        available from a <code>as&lt;string&gt;()</code> on this option. Text
+        and binary files are both supported. If the file name is specified in
+        the query, it will be available by requesting the option
+        "&lt;optionname&gt;.filename" where &lt;optionname&gt; is the name of
+        the option corresponding to the file.
+      </para>
+
+      <para>Let's take an example. Here is a very simple (if ugly-looking) HTML
+        form:
+        <programlisting>
+&lt;form method="post" enctype="multipart/form-data" action=cgi-bin/test_cgi_program&gt;
+    File:&lt;input type="file" name="file"&gt;&lt;br&gt;
+    Description: &lt;input type="text" name="description"&gt;&lt;br&gt;
+    Priority: &lt;input type="text" name="priority"&gt;&lt;br&gt;
+    &lt;input type="submit">
+&lt;/form&gt;
+        </programlisting>
+        When the submit button is pressed, a CGI query containing the file
+        content, the description and the priority is sent to the server, that
+        must handle it with the program cgi-bin/test_cgi_program. Here is a
+        possible implementation of this program using the cgi_query_parser:
+        <programlisting>
+// This has to be done in any CGI program
+cout &lt;&lt; "Content-Type: text/html\n" &lt;&lt; endl;
+
+options_description desc("Allowed options");
+desc.add_options()
+    ("file", value&lt;string&gt;(), "")
+    ("description", value&lt;string&gt;(), "")
+    ("priority", value&lt;int&gt;(), "")
+;
+
+variables_map vm;
+store(cgi_query_parser().options(desc).run(), vm);
+notify(vm);
+
+cout &lt;&lt; "The file " &lt;&lt; vm["file.filename"].as&lt;string&gt;()
+     &lt;&lt; " containing " &lt;&lt; vm["file"].as&lt;string&gt;().size()
+     &lt;&lt; " bytes of data has been uploaded.&lt;br&gt;";
+cout &lt;&lt; "Its has the priority " &lt;&lt; vm["priority"].as&lt;int&gt;()
+     &lt;&lt; " and comes with this description: " &lt;&lt; vm["description"].as&lt;string&gt;();
+        </programlisting>
+      </para>
+    </section>
   </section>
 
   <section>
