$95 GRAYBYTE WORDPRESS FILE MANAGER $21

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

/opt/alt/ruby21/lib64/ruby/2.1.0/webrick/

HOME
Current File : /opt/alt/ruby21/lib64/ruby/2.1.0/webrick//httpversion.rb
#--
# HTTPVersion.rb -- presentation of HTTP version
#
# Author: IPR -- Internet Programming with Ruby -- writers
# Copyright (c) 2002 Internet Programming with Ruby writers. All rights
# reserved.
#
# $IPR: httpversion.rb,v 1.5 2002/09/21 12:23:37 gotoyuzo Exp $

module WEBrick

  ##
  # Represents an HTTP protocol version

  class HTTPVersion
    include Comparable

    ##
    # The major protocol version number

    attr_accessor :major

    ##
    # The minor protocol version number

    attr_accessor :minor

    ##
    # Converts +version+ into an HTTPVersion

    def self.convert(version)
      version.is_a?(self) ? version : new(version)
    end

    ##
    # Creates a new HTTPVersion from +version+.

    def initialize(version)
      case version
      when HTTPVersion
        @major, @minor = version.major, version.minor
      when String
        if /^(\d+)\.(\d+)$/ =~ version
          @major, @minor = $1.to_i, $2.to_i
        end
      end
      if @major.nil? || @minor.nil?
        raise ArgumentError,
          format("cannot convert %s into %s", version.class, self.class)
      end
    end

    ##
    # Compares this version with +other+ according to the HTTP specification
    # rules.

    def <=>(other)
      unless other.is_a?(self.class)
        other = self.class.new(other)
      end
      if (ret = @major <=> other.major) == 0
        return @minor <=> other.minor
      end
      return ret
    end

    ##
    # The HTTP version as show in the HTTP request and response.  For example,
    # "1.1"

    def to_s
      format("%d.%d", @major, @minor)
    end
  end
end


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.53 PM
root / root
0755
httpauth
--
3 Mar 2024 10.43 PM
root / linksafe
0755
httpservlet
--
3 Mar 2024 10.43 PM
root / linksafe
0755
accesslog.rb
4.308 KB
11 Dec 2013 3.58 AM
root / linksafe
0644
cgi.rb
7.97 KB
26 Jan 2013 1.12 AM
root / linksafe
0644
compat.rb
0.891 KB
6 Dec 2013 2.10 AM
root / linksafe
0644
config.rb
5.564 KB
26 Jan 2013 1.12 AM
root / linksafe
0644
cookie.rb
3.884 KB
26 Jan 2013 2.31 AM
root / linksafe
0644
htmlutils.rb
0.664 KB
20 May 2013 1.40 AM
root / linksafe
0644
httpauth.rb
3.327 KB
10 May 2011 11.37 PM
root / linksafe
0644
httpproxy.rb
9.646 KB
4 Dec 2013 2.06 PM
root / linksafe
0644
httprequest.rb
14.396 KB
6 Dec 2013 1.56 AM
root / linksafe
0644
httpresponse.rb
10.635 KB
5 Dec 2013 11.32 AM
root / linksafe
0644
https.rb
1.865 KB
26 Jan 2013 1.12 AM
root / linksafe
0644
httpserver.rb
7.688 KB
26 Jan 2013 1.12 AM
root / linksafe
0644
httpservlet.rb
0.653 KB
2 Oct 2009 10.45 AM
root / linksafe
0644
httpstatus.rb
5.264 KB
6 Dec 2013 4.34 AM
root / linksafe
0644
httputils.rb
12.706 KB
20 May 2013 1.40 AM
root / linksafe
0644
httpversion.rb
1.573 KB
26 Jan 2013 1.12 AM
root / linksafe
0644
log.rb
3.922 KB
26 Jan 2013 1.12 AM
root / linksafe
0644
server.rb
8.415 KB
26 Jan 2013 1.12 AM
root / linksafe
0644
ssl.rb
6.668 KB
26 Jan 2013 1.12 AM
root / linksafe
0644
utils.rb
5.877 KB
28 Jun 2014 4.41 PM
root / linksafe
0644
version.rb
0.375 KB
26 Jan 2013 1.12 AM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF