doc/rdoc/classes/Mongrel/DirHandler.html in mongrel-0.2.2 vs doc/rdoc/classes/Mongrel/DirHandler.html in mongrel-0.3

- old
+ new

@@ -101,14 +101,15 @@ <div id="method-list"> <h3 class="section-bar">Methods</h3> <div class="name-list"> - <a href="#M000008">new</a>&nbsp;&nbsp; - <a href="#M000011">process</a>&nbsp;&nbsp; - <a href="#M000009">send_dir_listing</a>&nbsp;&nbsp; - <a href="#M000010">send_file</a>&nbsp;&nbsp; + <a href="#M000010">can_serve</a>&nbsp;&nbsp; + <a href="#M000009">new</a>&nbsp;&nbsp; + <a href="#M000013">process</a>&nbsp;&nbsp; + <a href="#M000011">send_dir_listing</a>&nbsp;&nbsp; + <a href="#M000012">send_file</a>&nbsp;&nbsp; </div> </div> </div> @@ -116,74 +117,136 @@ <!-- if includes --> <div id="section"> + <div id="constants-list"> + <h3 class="section-bar">Constants</h3> + <div class="name-list"> + <table summary="Constants"> + <tr class="top-aligned-row context-row"> + <td class="context-item-name">MIME_TYPES</td> + <td>=</td> + <td class="context-item-value">{ &quot;.css&quot; =&gt; &quot;text/css&quot;, &quot;.gif&quot; =&gt; &quot;image/gif&quot;, &quot;.htm&quot; =&gt; &quot;text/html&quot;, &quot;.html&quot; =&gt; &quot;text/html&quot;, &quot;.jpeg&quot; =&gt; &quot;image/jpeg&quot;, &quot;.jpg&quot; =&gt; &quot;image/jpeg&quot;, &quot;.js&quot; =&gt; &quot;text/javascript&quot;, &quot;.png&quot; =&gt; &quot;image/png&quot;, &quot;.swf&quot; =&gt; &quot;application/x-shockwave-flash&quot;, &quot;.txt&quot; =&gt; &quot;text/plain&quot;</td> + </tr> + </table> + </div> + </div> + + <div id="attribute-list"> + <h3 class="section-bar">Attributes</h3> + + <div class="name-list"> + <table> + <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> + </div> + </div> <!-- if method_list --> <div id="methods"> <h3 class="section-bar">Public Class methods</h3> - <div id="method-M000008" class="method-detail"> - <a name="M000008"></a> + <div id="method-M000009" class="method-detail"> + <a name="M000009"></a> <div class="method-heading"> - <a href="DirHandler.src/M000008.html" target="Code" class="method-signature" - onclick="popupCode('DirHandler.src/M000008.html');return false;"> - <span class="method-name">new</span><span class="method-args">(path, listing_allowed=true)</span> + <a href="DirHandler.src/M000009.html" target="Code" class="method-signature" + onclick="popupCode('DirHandler.src/M000009.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"> + <p> +You give it the path to the directory root and an (optional) +</p> </div> </div> <h3 class="section-bar">Public Instance methods</h3> - <div id="method-M000011" class="method-detail"> - <a name="M000011"></a> + <div id="method-M000010" class="method-detail"> + <a name="M000010"></a> <div class="method-heading"> - <a href="DirHandler.src/M000011.html" target="Code" class="method-signature" - onclick="popupCode('DirHandler.src/M000011.html');return false;"> + <a href="DirHandler.src/M000010.html" target="Code" class="method-signature" + onclick="popupCode('DirHandler.src/M000010.html');return false;"> + <span class="method-name">can_serve</span><span class="method-args">(path_info)</span> + </a> + </div> + + <div class="method-description"> + <p> +Checks if the given path can be served and returns the full path (or nil if +not). +</p> + </div> + </div> + + <div id="method-M000013" class="method-detail"> + <a name="M000013"></a> + + <div class="method-heading"> + <a href="DirHandler.src/M000013.html" target="Code" class="method-signature" + onclick="popupCode('DirHandler.src/M000013.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). +</p> </div> </div> - <div id="method-M000009" class="method-detail"> - <a name="M000009"></a> + <div id="method-M000011" class="method-detail"> + <a name="M000011"></a> <div class="method-heading"> - <a href="DirHandler.src/M000009.html" target="Code" class="method-signature" - onclick="popupCode('DirHandler.src/M000009.html');return false;"> + <a href="DirHandler.src/M000011.html" target="Code" class="method-signature" + onclick="popupCode('DirHandler.src/M000011.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#M000010">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-M000010" class="method-detail"> - <a name="M000010"></a> + <div id="method-M000012" class="method-detail"> + <a name="M000012"></a> <div class="method-heading"> - <a href="DirHandler.src/M000010.html" target="Code" class="method-signature" - onclick="popupCode('DirHandler.src/M000010.html');return false;"> + <a href="DirHandler.src/M000012.html" target="Code" class="method-signature" + onclick="popupCode('DirHandler.src/M000012.html');return false;"> <span class="method-name">send_file</span><span class="method-args">(req, response)</span> </a> </div> <div class="method-description"> + <p> +Sends the contents of a file back to the user. Not terribly efficient since +it&#8217;s opening and closing the file for each read. +</p> </div> </div> </div> \ No newline at end of file