doc/rdoc/classes/Mongrel/DirHandler.html in mongrel-0.3.12.4 vs doc/rdoc/classes/Mongrel/DirHandler.html in mongrel-0.3.13

- old
+ new

@@ -91,26 +91,31 @@ It does a simple protection against going outside it&#8217;s root path by converting all paths to an absolute expanded path, and then making sure that the final expanded path includes the root path. If it doesn&#8217;t than it simply gives a 404. </p> +<p> +The default content type is &quot;text/plain; charset=ISO-8859-1&quot; but +you can change it anything you want using the +DirHandler.default_content_type attribute. +</p> </div> </div> <div id="method-list"> <h3 class="section-bar">Methods</h3> <div class="name-list"> - <a href="#M000063">add_mime_type</a>&nbsp;&nbsp; - <a href="#M000059">can_serve</a>&nbsp;&nbsp; - <a href="#M000058">new</a>&nbsp;&nbsp; - <a href="#M000062">process</a>&nbsp;&nbsp; - <a href="#M000060">send_dir_listing</a>&nbsp;&nbsp; - <a href="#M000061">send_file</a>&nbsp;&nbsp; + <a href="#M000061">add_mime_type</a>&nbsp;&nbsp; + <a href="#M000057">can_serve</a>&nbsp;&nbsp; + <a href="#M000056">new</a>&nbsp;&nbsp; + <a href="#M000060">process</a>&nbsp;&nbsp; + <a href="#M000058">send_dir_listing</a>&nbsp;&nbsp; + <a href="#M000059">send_file</a>&nbsp;&nbsp; </div> </div> </div> @@ -145,10 +150,20 @@ <h3 class="section-bar">Attributes</h3> <div class="name-list"> <table> <tr class="top-aligned-row context-row"> + <td class="context-item-name">default_content_type</td> + <td class="context-item-value">&nbsp;[R]&nbsp;</td> + <td class="context-item-desc"></td> + </tr> + <tr class="top-aligned-row context-row"> + <td class="context-item-name">default_content_type</td> + <td class="context-item-value">&nbsp;[W]&nbsp;</td> + <td class="context-item-desc"></td> + </tr> + <tr class="top-aligned-row context-row"> <td class="context-item-name">path</td> <td class="context-item-value">&nbsp;[R]&nbsp;</td> <td class="context-item-desc"></td> </tr> </table> @@ -159,16 +174,16 @@ <!-- if method_list --> <div id="methods"> <h3 class="section-bar">Public Class methods</h3> - <div id="method-M000063" class="method-detail"> - <a name="M000063"></a> + <div id="method-M000061" class="method-detail"> + <a name="M000061"></a> <div class="method-heading"> - <a href="DirHandler.src/M000063.html" target="Code" class="method-signature" - onclick="popupCode('DirHandler.src/M000063.html');return false;"> + <a href="DirHandler.src/M000061.html" target="Code" class="method-signature" + onclick="popupCode('DirHandler.src/M000061.html');return false;"> <span class="method-name">add_mime_type</span><span class="method-args">(extension, type)</span> </a> </div> <div class="method-description"> @@ -177,16 +192,16 @@ you add any others you&#8217;ll need when serving content. </p> </div> </div> - <div id="method-M000058" class="method-detail"> - <a name="M000058"></a> + <div id="method-M000056" class="method-detail"> + <a name="M000056"></a> <div class="method-heading"> - <a href="DirHandler.src/M000058.html" target="Code" class="method-signature" - onclick="popupCode('DirHandler.src/M000058.html');return false;"> + <a href="DirHandler.src/M000056.html" target="Code" class="method-signature" + onclick="popupCode('DirHandler.src/M000056.html');return false;"> <span class="method-name">new</span><span class="method-args">(path, listing_allowed=true, index_html=&quot;index.html&quot;)</span> </a> </div> <div class="method-description"> @@ -196,16 +211,16 @@ </div> </div> <h3 class="section-bar">Public Instance methods</h3> - <div id="method-M000059" class="method-detail"> - <a name="M000059"></a> + <div id="method-M000057" class="method-detail"> + <a name="M000057"></a> <div class="method-heading"> - <a href="DirHandler.src/M000059.html" target="Code" class="method-signature" - onclick="popupCode('DirHandler.src/M000059.html');return false;"> + <a href="DirHandler.src/M000057.html" target="Code" class="method-signature" + onclick="popupCode('DirHandler.src/M000057.html');return false;"> <span class="method-name">can_serve</span><span class="method-args">(path_info)</span> </a> </div> <div class="method-description"> @@ -214,55 +229,55 @@ not). </p> </div> </div> - <div id="method-M000062" class="method-detail"> - <a name="M000062"></a> + <div id="method-M000060" class="method-detail"> + <a name="M000060"></a> <div class="method-heading"> - <a href="DirHandler.src/M000062.html" target="Code" class="method-signature" - onclick="popupCode('DirHandler.src/M000062.html');return false;"> + <a href="DirHandler.src/M000060.html" target="Code" class="method-signature" + onclick="popupCode('DirHandler.src/M000060.html');return false;"> <span class="method-name">process</span><span class="method-args">(request, response)</span> </a> </div> <div class="method-description"> <p> Process the request to either serve a file or a directory listing if -allowed (based on the listing_allowed paramter to the constructor). +allowed (based on the listing_allowed parameter to the constructor). </p> </div> </div> - <div id="method-M000060" class="method-detail"> - <a name="M000060"></a> + <div id="method-M000058" class="method-detail"> + <a name="M000058"></a> <div class="method-heading"> - <a href="DirHandler.src/M000060.html" target="Code" class="method-signature" - onclick="popupCode('DirHandler.src/M000060.html');return false;"> + <a href="DirHandler.src/M000058.html" target="Code" class="method-signature" + onclick="popupCode('DirHandler.src/M000058.html');return false;"> <span class="method-name">send_dir_listing</span><span class="method-args">(base, dir, response)</span> </a> </div> <div class="method-description"> <p> Returns a simplistic directory listing if they&#8217;re enabled, otherwise a 403. Base is the base URI from the REQUEST_URI, dir is the directory to serve on the file system (comes from <a -href="DirHandler.html#M000059">can_serve</a>()), and response is the <a +href="DirHandler.html#M000057">can_serve</a>()), and response is the <a href="HttpResponse.html">HttpResponse</a> object to send the results on. </p> </div> </div> - <div id="method-M000061" class="method-detail"> - <a name="M000061"></a> + <div id="method-M000059" class="method-detail"> + <a name="M000059"></a> <div class="method-heading"> - <a href="DirHandler.src/M000061.html" target="Code" class="method-signature" - onclick="popupCode('DirHandler.src/M000061.html');return false;"> - <span class="method-name">send_file</span><span class="method-args">(req, response, header_only=false)</span> + <a href="DirHandler.src/M000059.html" target="Code" class="method-signature" + onclick="popupCode('DirHandler.src/M000059.html');return false;"> + <span class="method-name">send_file</span><span class="method-args">(req_path, request, response, header_only=false)</span> </a> </div> <div class="method-description"> <p> \ No newline at end of file