webrick 1.8.2 → 1.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -0
- data/README.md +2 -0
- data/lib/webrick/cgi.rb +1 -1
- data/lib/webrick/httpauth/authenticator.rb +4 -4
- data/lib/webrick/httpauth/htgroup.rb +1 -1
- data/lib/webrick/httpauth/htpasswd.rb +2 -2
- data/lib/webrick/httpproxy.rb +4 -4
- data/lib/webrick/httprequest.rb +6 -6
- data/lib/webrick/httpresponse.rb +1 -1
- data/lib/webrick/httpserver.rb +2 -2
- data/lib/webrick/httpservlet/abstract.rb +1 -1
- data/lib/webrick/httpservlet/filehandler.rb +6 -6
- data/lib/webrick/httputils.rb +2 -2
- data/lib/webrick/server.rb +1 -1
- data/lib/webrick/version.rb +1 -1
- data/sig/accesslog.rbs +24 -0
- data/sig/cgi.rbs +92 -0
- data/sig/compat.rbs +18 -0
- data/sig/config.rbs +17 -0
- data/sig/cookie.rbs +37 -0
- data/sig/htmlutils.rbs +5 -0
- data/sig/httpauth/authenticator.rbs +55 -0
- data/sig/httpauth/basicauth.rbs +29 -0
- data/sig/httpauth/digestauth.rbs +85 -0
- data/sig/httpauth/htdigest.rbs +31 -0
- data/sig/httpauth/htgroup.rbs +21 -0
- data/sig/httpauth/htpasswd.rbs +31 -0
- data/sig/httpauth/userdb.rbs +13 -0
- data/sig/httpauth.rbs +13 -0
- data/sig/httpproxy.rbs +61 -0
- data/sig/httprequest.rbs +167 -0
- data/sig/httpresponse.rbs +117 -0
- data/sig/https.rbs +49 -0
- data/sig/httpserver.rbs +71 -0
- data/sig/httpservlet/abstract.rbs +36 -0
- data/sig/httpservlet/cgi_runner.rbs +3 -0
- data/sig/httpservlet/cgihandler.rbs +23 -0
- data/sig/httpservlet/erbhandler.rbs +17 -0
- data/sig/httpservlet/filehandler.rbs +76 -0
- data/sig/httpservlet/prochandler.rbs +21 -0
- data/sig/httpservlet.rbs +4 -0
- data/sig/httpstatus.rbs +255 -0
- data/sig/httputils.rbs +116 -0
- data/sig/httpversion.rbs +17 -0
- data/sig/log.rbs +93 -0
- data/sig/manifest.yaml +8 -0
- data/sig/server.rbs +57 -0
- data/sig/ssl.rbs +19 -0
- data/sig/utils.rbs +122 -0
- data/sig/version.rbs +3 -0
- data/webrick.gemspec +35 -0
- metadata +43 -5
data/sig/utils.rbs
ADDED
@@ -0,0 +1,122 @@
|
|
1
|
+
module WEBrick
|
2
|
+
module Utils
|
3
|
+
#
|
4
|
+
# Sets IO operations on +io+ to be non-blocking
|
5
|
+
def self?.set_non_blocking: (IO io) -> void
|
6
|
+
|
7
|
+
#
|
8
|
+
# Sets the close on exec flag for +io+
|
9
|
+
def self?.set_close_on_exec: (IO io) -> void
|
10
|
+
|
11
|
+
#
|
12
|
+
# Changes the process's uid and gid to the ones of +user+
|
13
|
+
def self?.su: (String user) -> void
|
14
|
+
|
15
|
+
#
|
16
|
+
# The server hostname
|
17
|
+
def self?.getservername: () -> String
|
18
|
+
|
19
|
+
#
|
20
|
+
# Creates TCP server sockets bound to +address+:+port+ and returns them.
|
21
|
+
#
|
22
|
+
# It will create IPV4 and IPV6 sockets on all interfaces.
|
23
|
+
def self?.create_listeners: (String host, Integer port) -> Array[TCPServer]
|
24
|
+
|
25
|
+
#
|
26
|
+
# Characters used to generate random strings
|
27
|
+
RAND_CHARS: String
|
28
|
+
|
29
|
+
#
|
30
|
+
# Generates a random string of length +len+
|
31
|
+
def self?.random_string: (Integer len) -> String
|
32
|
+
|
33
|
+
#
|
34
|
+
# Class used to manage timeout handlers across multiple threads.
|
35
|
+
#
|
36
|
+
# Timeout handlers should be managed by using the class methods which are
|
37
|
+
# synchronized.
|
38
|
+
#
|
39
|
+
# id = TimeoutHandler.register(10, Timeout::Error)
|
40
|
+
# begin
|
41
|
+
# sleep 20
|
42
|
+
# puts 'foo'
|
43
|
+
# ensure
|
44
|
+
# TimeoutHandler.cancel(id)
|
45
|
+
# end
|
46
|
+
#
|
47
|
+
# will raise Timeout::Error
|
48
|
+
#
|
49
|
+
# id = TimeoutHandler.register(10, Timeout::Error)
|
50
|
+
# begin
|
51
|
+
# sleep 5
|
52
|
+
# puts 'foo'
|
53
|
+
# ensure
|
54
|
+
# TimeoutHandler.cancel(id)
|
55
|
+
# end
|
56
|
+
#
|
57
|
+
# will print 'foo'
|
58
|
+
#
|
59
|
+
class TimeoutHandler
|
60
|
+
@queue: Thread::Queue
|
61
|
+
|
62
|
+
@watcher: Thread?
|
63
|
+
|
64
|
+
include Singleton
|
65
|
+
|
66
|
+
#
|
67
|
+
# Mutex used to synchronize access across threads
|
68
|
+
TimeoutMutex: Thread::Mutex
|
69
|
+
|
70
|
+
#
|
71
|
+
# Registers a new timeout handler
|
72
|
+
#
|
73
|
+
# +time+:: Timeout in seconds
|
74
|
+
# +exception+:: Exception to raise when timeout elapsed
|
75
|
+
def self.register: (Numeric seconds, singleton(Exception) exception) -> Integer
|
76
|
+
|
77
|
+
#
|
78
|
+
# Cancels the timeout handler +id+
|
79
|
+
def self.cancel: (Integer id) -> bool
|
80
|
+
|
81
|
+
def self.terminate: () -> Thread?
|
82
|
+
|
83
|
+
#
|
84
|
+
# Creates a new TimeoutHandler. You should use ::register and ::cancel
|
85
|
+
# instead of creating the timeout handler directly.
|
86
|
+
def initialize: () -> void
|
87
|
+
|
88
|
+
private
|
89
|
+
|
90
|
+
def watch: () -> bot
|
91
|
+
|
92
|
+
def watcher: () -> Thread
|
93
|
+
|
94
|
+
public
|
95
|
+
|
96
|
+
#
|
97
|
+
# Interrupts the timeout handler +id+ and raises +exception+
|
98
|
+
def interrupt: (Thread thread, Integer id, singleton(Exception) exception) -> nil
|
99
|
+
|
100
|
+
#
|
101
|
+
# Registers a new timeout handler
|
102
|
+
#
|
103
|
+
# +time+:: Timeout in seconds
|
104
|
+
# +exception+:: Exception to raise when timeout elapsed
|
105
|
+
def register: (Thread thread, Numeric time, singleton(Exception) exception) -> Integer
|
106
|
+
|
107
|
+
#
|
108
|
+
# Cancels the timeout handler +id+
|
109
|
+
def cancel: (Thread thread, Integer id) -> bool
|
110
|
+
|
111
|
+
#
|
112
|
+
def terminate: () -> Thread?
|
113
|
+
end
|
114
|
+
|
115
|
+
#
|
116
|
+
# Executes the passed block and raises +exception+ if execution takes more
|
117
|
+
# than +seconds+.
|
118
|
+
#
|
119
|
+
# If +seconds+ is zero or nil, simply executes the block
|
120
|
+
def self?.timeout: [T] (Numeric? seconds, ?singleton(Exception) exception) { (?Numeric) -> T } -> T
|
121
|
+
end
|
122
|
+
end
|
data/sig/version.rbs
ADDED
data/webrick.gemspec
CHANGED
@@ -53,6 +53,41 @@ Gem::Specification.new do |s|
|
|
53
53
|
"lib/webrick/ssl.rb",
|
54
54
|
"lib/webrick/utils.rb",
|
55
55
|
"lib/webrick/version.rb",
|
56
|
+
"sig/accesslog.rbs",
|
57
|
+
"sig/cgi.rbs",
|
58
|
+
"sig/compat.rbs",
|
59
|
+
"sig/config.rbs",
|
60
|
+
"sig/cookie.rbs",
|
61
|
+
"sig/htmlutils.rbs",
|
62
|
+
"sig/httpauth.rbs",
|
63
|
+
"sig/httpauth/authenticator.rbs",
|
64
|
+
"sig/httpauth/basicauth.rbs",
|
65
|
+
"sig/httpauth/digestauth.rbs",
|
66
|
+
"sig/httpauth/htdigest.rbs",
|
67
|
+
"sig/httpauth/htgroup.rbs",
|
68
|
+
"sig/httpauth/htpasswd.rbs",
|
69
|
+
"sig/httpauth/userdb.rbs",
|
70
|
+
"sig/httpproxy.rbs",
|
71
|
+
"sig/httprequest.rbs",
|
72
|
+
"sig/httpresponse.rbs",
|
73
|
+
"sig/https.rbs",
|
74
|
+
"sig/httpserver.rbs",
|
75
|
+
"sig/httpservlet.rbs",
|
76
|
+
"sig/httpservlet/abstract.rbs",
|
77
|
+
"sig/httpservlet/cgi_runner.rbs",
|
78
|
+
"sig/httpservlet/cgihandler.rbs",
|
79
|
+
"sig/httpservlet/erbhandler.rbs",
|
80
|
+
"sig/httpservlet/filehandler.rbs",
|
81
|
+
"sig/httpservlet/prochandler.rbs",
|
82
|
+
"sig/httpstatus.rbs",
|
83
|
+
"sig/httputils.rbs",
|
84
|
+
"sig/httpversion.rbs",
|
85
|
+
"sig/log.rbs",
|
86
|
+
"sig/manifest.yaml",
|
87
|
+
"sig/server.rbs",
|
88
|
+
"sig/ssl.rbs",
|
89
|
+
"sig/utils.rbs",
|
90
|
+
"sig/version.rbs",
|
56
91
|
"webrick.gemspec",
|
57
92
|
]
|
58
93
|
s.required_ruby_version = ">= 2.4.0"
|
metadata
CHANGED
@@ -1,21 +1,22 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webrick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TAKAHASHI Masayoshi
|
8
8
|
- GOTOU YUUZOU
|
9
9
|
- Eric Wong
|
10
|
+
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2024-
|
13
|
+
date: 2024-12-02 00:00:00.000000000 Z
|
13
14
|
dependencies: []
|
14
15
|
description: WEBrick is an HTTP server toolkit that can be configured as an HTTPS
|
15
16
|
server, a proxy server, and a virtual-host server.
|
16
17
|
email:
|
17
|
-
-
|
18
|
-
-
|
18
|
+
-
|
19
|
+
-
|
19
20
|
- normal@ruby-lang.org
|
20
21
|
executables: []
|
21
22
|
extensions: []
|
@@ -60,6 +61,41 @@ files:
|
|
60
61
|
- lib/webrick/ssl.rb
|
61
62
|
- lib/webrick/utils.rb
|
62
63
|
- lib/webrick/version.rb
|
64
|
+
- sig/accesslog.rbs
|
65
|
+
- sig/cgi.rbs
|
66
|
+
- sig/compat.rbs
|
67
|
+
- sig/config.rbs
|
68
|
+
- sig/cookie.rbs
|
69
|
+
- sig/htmlutils.rbs
|
70
|
+
- sig/httpauth.rbs
|
71
|
+
- sig/httpauth/authenticator.rbs
|
72
|
+
- sig/httpauth/basicauth.rbs
|
73
|
+
- sig/httpauth/digestauth.rbs
|
74
|
+
- sig/httpauth/htdigest.rbs
|
75
|
+
- sig/httpauth/htgroup.rbs
|
76
|
+
- sig/httpauth/htpasswd.rbs
|
77
|
+
- sig/httpauth/userdb.rbs
|
78
|
+
- sig/httpproxy.rbs
|
79
|
+
- sig/httprequest.rbs
|
80
|
+
- sig/httpresponse.rbs
|
81
|
+
- sig/https.rbs
|
82
|
+
- sig/httpserver.rbs
|
83
|
+
- sig/httpservlet.rbs
|
84
|
+
- sig/httpservlet/abstract.rbs
|
85
|
+
- sig/httpservlet/cgi_runner.rbs
|
86
|
+
- sig/httpservlet/cgihandler.rbs
|
87
|
+
- sig/httpservlet/erbhandler.rbs
|
88
|
+
- sig/httpservlet/filehandler.rbs
|
89
|
+
- sig/httpservlet/prochandler.rbs
|
90
|
+
- sig/httpstatus.rbs
|
91
|
+
- sig/httputils.rbs
|
92
|
+
- sig/httpversion.rbs
|
93
|
+
- sig/log.rbs
|
94
|
+
- sig/manifest.yaml
|
95
|
+
- sig/server.rbs
|
96
|
+
- sig/ssl.rbs
|
97
|
+
- sig/utils.rbs
|
98
|
+
- sig/version.rbs
|
63
99
|
- webrick.gemspec
|
64
100
|
homepage: https://github.com/ruby/webrick
|
65
101
|
licenses:
|
@@ -67,6 +103,7 @@ licenses:
|
|
67
103
|
- BSD-2-Clause
|
68
104
|
metadata:
|
69
105
|
bug_tracker_uri: https://github.com/ruby/webrick/issues
|
106
|
+
post_install_message:
|
70
107
|
rdoc_options: []
|
71
108
|
require_paths:
|
72
109
|
- lib
|
@@ -81,7 +118,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
118
|
- !ruby/object:Gem::Version
|
82
119
|
version: '0'
|
83
120
|
requirements: []
|
84
|
-
rubygems_version: 3.
|
121
|
+
rubygems_version: 3.5.11
|
122
|
+
signing_key:
|
85
123
|
specification_version: 4
|
86
124
|
summary: HTTP server toolkit
|
87
125
|
test_files: []
|