GRAYBYTE WORDPRESS FILE MANAGER6751

Server IP : 198.54.121.189 / Your IP : 216.73.216.224
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/alt/ruby18/lib64/ruby/1.8/webrick/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/alt/ruby18/lib64/ruby/1.8/webrick//cookie.rb
#
# cookie.rb -- Cookie class
#
# Author: IPR -- Internet Programming with Ruby -- writers
# Copyright (c) 2000, 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou
# Copyright (c) 2002 Internet Programming with Ruby writers. All rights
# reserved.
#
# $IPR: cookie.rb,v 1.16 2002/09/21 12:23:35 gotoyuzo Exp $

require 'time'
require 'webrick/httputils'

module WEBrick
  class Cookie

    attr_reader :name
    attr_accessor :value, :version
    attr_accessor :domain, :path, :secure
    attr_accessor :comment, :max_age
    #attr_accessor :comment_url, :discard, :port

    def initialize(name, value)
      @name = name
      @value = value
      @version = 0     # Netscape Cookie

      @domain = @path = @secure = @comment = @max_age =
      @expires = @comment_url = @discard = @port = nil
    end

    def expires=(t)
      @expires = t && (t.is_a?(Time) ? t.httpdate : t.to_s)
    end

    def expires
      @expires && Time.parse(@expires)
    end

    def to_s
      ret = ""
      ret << @name << "=" << @value
      ret << "; " << "Version=" << @version.to_s if @version > 0
      ret << "; " << "Domain="  << @domain  if @domain
      ret << "; " << "Expires=" << @expires if @expires
      ret << "; " << "Max-Age=" << @max_age.to_s if @max_age
      ret << "; " << "Comment=" << @comment if @comment
      ret << "; " << "Path="    << @path if @path
      ret << "; " << "Secure"   if @secure
      ret
    end

    # Cookie::parse()
    #   It parses Cookie field sent from the user agent.
    def self.parse(str)
      if str
        ret = []
        cookie = nil
        ver = 0
        str.split(/[;,]\s+/).each{|x|
          key, val = x.split(/=/,2)
          val = val ? HTTPUtils::dequote(val) : ""
          case key
          when "$Version"; ver = val.to_i
          when "$Path";    cookie.path = val
          when "$Domain";  cookie.domain = val
          when "$Port";    cookie.port = val
          else
            ret << cookie if cookie
            cookie = self.new(key, val)
            cookie.version = ver
          end
        }
        ret << cookie if cookie
        ret
      end
    end

    def self.parse_set_cookie(str)
      cookie_elem = str.split(/;/)
      first_elem = cookie_elem.shift
      first_elem.strip!
      key, value = first_elem.split(/=/, 2)
      cookie = new(key, HTTPUtils.dequote(value))
      cookie_elem.each{|pair|
        pair.strip!
        key, value = pair.split(/=/, 2)
        if value
          value = HTTPUtils.dequote(value.strip)
        end
        case key.downcase
        when "domain"  then cookie.domain  = value
        when "path"    then cookie.path    = value
        when "expires" then cookie.expires = value
        when "max-age" then cookie.max_age = Integer(value)
        when "comment" then cookie.comment = value
        when "version" then cookie.version = Integer(value)
        when "secure"  then cookie.secure = true
        end
      }
      return cookie
    end

    def self.parse_set_cookies(str)
      return str.split(/,(?=[^;,]*=)|,$/).collect{|c|
        parse_set_cookie(c)
      }
    end
  end
end

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
March 03 2024 22:48:17
root / root
0755
httpauth
--
March 03 2024 22:48:14
root / linksafe
0755
httpservlet
--
March 03 2024 22:48:14
root / linksafe
0755
accesslog.rb
2.246 KB
June 23 2011 09:44:05
root / linksafe
0644
cgi.rb
6.915 KB
February 12 2007 23:01:19
root / linksafe
0644
compat.rb
0.426 KB
February 12 2007 23:01:19
root / linksafe
0644
config.rb
3.135 KB
February 12 2007 23:01:19
root / linksafe
0644
cookie.rb
3.032 KB
February 12 2007 23:01:19
root / linksafe
0644
htmlutils.rb
0.57 KB
February 12 2007 23:01:19
root / linksafe
0644
httpauth.rb
1.31 KB
February 12 2007 23:01:19
root / linksafe
0644
httpproxy.rb
7.46 KB
June 06 2008 08:05:24
root / linksafe
0644
httprequest.rb
9.99 KB
November 22 2010 07:22:01
root / linksafe
0644
httpresponse.rb
7.961 KB
August 16 2010 07:31:35
root / linksafe
0644
https.rb
1.639 KB
December 20 2010 16:55:16
root / linksafe
0644
httpserver.rb
5.632 KB
February 12 2007 23:01:19
root / linksafe
0644
httpservlet.rb
0.653 KB
February 12 2007 23:01:19
root / linksafe
0644
httpstatus.rb
3.51 KB
June 10 2010 05:23:49
root / linksafe
0644
httputils.rb
9.964 KB
January 10 2010 10:30:06
root / linksafe
0644
httpversion.rb
1.115 KB
February 12 2007 23:01:19
root / linksafe
0644
log.rb
2.034 KB
February 12 2007 23:01:19
root / linksafe
0644
server.rb
5.279 KB
February 12 2007 23:01:19
root / linksafe
0644
ssl.rb
4.222 KB
November 22 2010 07:21:52
root / linksafe
0644
utils.rb
2.543 KB
June 06 2012 05:20:08
root / linksafe
0644
version.rb
0.343 KB
February 12 2007 23:01:19
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF