ftw 0.0.47 → 0.0.48
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ftw/http/message.rb +4 -1
- data/lib/ftw/server.rb +1 -1
- data/lib/ftw/version.rb +1 -1
- data/lib/ftw/webserver.rb +2 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95e6909d52fb80ff64c3100bb0c45f840b41131f
|
4
|
+
data.tar.gz: 115241a45b018605322cba89c04fe330afc6348f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aec58e467111109f19d8c911bb3b8b1a47a62b6a5d5b129d688482148046b6b1675b0ecb632c0d820d8d6156b43c47b75ad4ccfcdba06ff7e87da847fcbc2a43
|
7
|
+
data.tar.gz: adb3cb13aabd4c57dbf800646230f2ea468b91181069ad1d214ccbd8f2e7776634a92bceeda9fcf02636d3d30a98ba489480fef036ad27e97b98517acfca7a67
|
data/lib/ftw/http/message.rb
CHANGED
@@ -21,6 +21,9 @@ module FTW::HTTP::Message
|
|
21
21
|
# HTTP Versions that are valid.
|
22
22
|
VALID_VERSIONS = [1.0, 1.1]
|
23
23
|
|
24
|
+
# For backward-compatibility, this exception inherits from ArgumentError
|
25
|
+
UnsupportedHTTPVersion = Class.new(ArgumentError)
|
26
|
+
|
24
27
|
private
|
25
28
|
|
26
29
|
# A new HTTP message.
|
@@ -101,7 +104,7 @@ module FTW::HTTP::Message
|
|
101
104
|
ver = ver.to_f if !ver.is_a?(Float)
|
102
105
|
|
103
106
|
if !VALID_VERSIONS.include?(ver)
|
104
|
-
raise
|
107
|
+
raise UnsupportedHTTPVersion.new("#{self.class.name}#version = #{ver.inspect} is" \
|
105
108
|
"invalid. It must be a number, one of #{VALID_VERSIONS.join(", ")}")
|
106
109
|
end
|
107
110
|
@version = ver
|
data/lib/ftw/server.rb
CHANGED
@@ -106,7 +106,7 @@ class FTW::Server
|
|
106
106
|
# TODO(sissel): Select on all sockets
|
107
107
|
# TODO(sissel): Accept and yield to the block
|
108
108
|
stopper = @stopper[0]
|
109
|
-
while
|
109
|
+
while !@sockets.empty?
|
110
110
|
@control_lock.synchronize do
|
111
111
|
sockets = @sockets.values + [stopper]
|
112
112
|
read, write, error = IO.select(sockets, nil, nil, nil)
|
data/lib/ftw/version.rb
CHANGED
data/lib/ftw/webserver.rb
CHANGED
@@ -49,6 +49,8 @@ class FTW::WebServer
|
|
49
49
|
# Connection EOF'd or errored before we finished reading a full HTTP
|
50
50
|
# message, shut it down.
|
51
51
|
break
|
52
|
+
rescue FTW::HTTP::Message::UnsupportedHTTPVersion
|
53
|
+
break
|
52
54
|
end
|
53
55
|
|
54
56
|
if request["Content-Length"] || request["Transfer-Encoding"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ftw
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.48
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordan Sissel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cabin
|
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
146
|
version: '0'
|
147
147
|
requirements: []
|
148
148
|
rubyforge_project:
|
149
|
-
rubygems_version: 2.6.
|
149
|
+
rubygems_version: 2.6.11
|
150
150
|
signing_key:
|
151
151
|
specification_version: 4
|
152
152
|
summary: For The Web. Trying to build a solid and sane API for client and server web
|