%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/ruby18/lib64/ruby/gems/1.8/doc/rack-1.6.1/rdoc/classes/Rack/Directory.src/
Upload File :
Create Path :
Current File : //opt/alt/ruby18/lib64/ruby/gems/1.8/doc/rack-1.6.1/rdoc/classes/Rack/Directory.src/M000432.html

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>check_forbidden (Rack::Directory)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File lib/rack/directory.rb, line 70</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">check_forbidden</span>
      <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@path_info</span>.<span class="ruby-identifier">include?</span> <span class="ruby-value str">&quot;..&quot;</span>

      <span class="ruby-identifier">body</span> = <span class="ruby-value str">&quot;Forbidden\n&quot;</span>
      <span class="ruby-identifier">size</span> = <span class="ruby-constant">Rack</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span>.<span class="ruby-identifier">bytesize</span>(<span class="ruby-identifier">body</span>)
      <span class="ruby-keyword kw">return</span> [<span class="ruby-value">403</span>, {<span class="ruby-value str">&quot;Content-Type&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;text/plain&quot;</span>,
        <span class="ruby-constant">CONTENT_LENGTH</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">size</span>.<span class="ruby-identifier">to_s</span>,
        <span class="ruby-value str">&quot;X-Cascade&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;pass&quot;</span>}, [<span class="ruby-identifier">body</span>]]
    <span class="ruby-keyword kw">end</span></pre>
</body>
</html>

Zerion Mini Shell 1.0