$19 GRAYBYTE WORDPRESS FILE MANAGER $18

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.23
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/ruby18/lib64/ruby/gems/1.8/doc/rack-1.6.1/rdoc/files/lib/rack/utils_rb.src/

HOME
Current File : /opt/alt/ruby18/lib64/ruby/gems/1.8/doc/rack-1.6.1/rdoc/files/lib/rack/utils_rb.src//M000018.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>clean_path_info (lib/rack/utils.rb)</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/utils.rb, line 660</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clean_path_info</span>(<span class="ruby-identifier">path_info</span>)
      <span class="ruby-identifier">parts</span> = <span class="ruby-identifier">path_info</span>.<span class="ruby-identifier">split</span> <span class="ruby-constant">PATH_SEPS</span>

      <span class="ruby-identifier">clean</span> = []

      <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">part</span><span class="ruby-operator">|</span>
        <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">part</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">part</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'.'</span>
        <span class="ruby-identifier">part</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'..'</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">clean</span>.<span class="ruby-identifier">pop</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">clean</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">part</span>
      <span class="ruby-keyword kw">end</span>

      <span class="ruby-identifier">clean</span>.<span class="ruby-identifier">unshift</span> <span class="ruby-value str">'/'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">empty?</span>

      <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">clean</span>)
    <span class="ruby-keyword kw">end</span></pre>
</body>
</html>


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.50 PM
root / root
0755
M000001.html
6.405 KB
5 Dec 2019 10.14 PM
root / root
0644
M000002.html
1.042 KB
5 Dec 2019 10.14 PM
root / root
0644
M000003.html
1.997 KB
5 Dec 2019 10.14 PM
root / root
0644
M000004.html
2.964 KB
5 Dec 2019 10.14 PM
root / root
0644
M000005.html
2.037 KB
5 Dec 2019 10.14 PM
root / root
0644
M000006.html
2.994 KB
5 Dec 2019 10.14 PM
root / root
0644
M000007.html
1.101 KB
5 Dec 2019 10.14 PM
root / root
0644
M000008.html
4.422 KB
5 Dec 2019 10.14 PM
root / root
0644
M000009.html
7.884 KB
5 Dec 2019 10.14 PM
root / root
0644
M000010.html
4.106 KB
5 Dec 2019 10.14 PM
root / root
0644
M000011.html
0.813 KB
5 Dec 2019 10.14 PM
root / root
0644
M000012.html
0.81 KB
5 Dec 2019 10.14 PM
root / root
0644
M000013.html
0.801 KB
5 Dec 2019 10.14 PM
root / root
0644
M000014.html
1.462 KB
5 Dec 2019 10.14 PM
root / root
0644
M000015.html
5.12 KB
5 Dec 2019 10.14 PM
root / root
0644
M000016.html
2.043 KB
5 Dec 2019 10.14 PM
root / root
0644
M000017.html
1.256 KB
5 Dec 2019 10.14 PM
root / root
0644
M000018.html
2.605 KB
5 Dec 2019 10.14 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF