protocol-http 0.23.11 → 0.23.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/protocol/http/body/deflate.rb +6 -0
- data/lib/protocol/http/body/digestable.rb +4 -0
- data/lib/protocol/http/body/file.rb +4 -0
- data/lib/protocol/http/body/inflate.rb +4 -0
- data/lib/protocol/http/body/rewindable.rb +4 -0
- data/lib/protocol/http/body/stream.rb +1 -1
- data/lib/protocol/http/middleware/builder.rb +0 -9
- data/lib/protocol/http/middleware.rb +5 -5
- data/lib/protocol/http/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cae774ef59f117617900a2b230789cdeb05c4eb7a5ec37fe92a9fd9ecfdd960
|
4
|
+
data.tar.gz: 323033ee1461a0690f5dfb130b0a710b89358c65097e0759031df5a54b5a8175
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8a9a03e66bd5f3a31e73646d5defc3faa5e05324927ae0c999bb66d2767461a35cd7e5d394ed34a4e24bdbcddcf2186a910e1137e3c4dfd989d3ec420e973c3
|
7
|
+
data.tar.gz: 2b9a8c75c3775f52d3ad711b1565e4db6b2b03968c240c0f5f7fccd365bde27f69ee9d3f9754ace710172eb4edd91a9c5f890adfa1a7e523a0db1be44d806d36
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -89,6 +89,12 @@ module Protocol
|
|
89
89
|
self.new(body, Zlib::Deflate.new(level, window_size))
|
90
90
|
end
|
91
91
|
|
92
|
+
def stream?
|
93
|
+
# We might want to revisit this design choice.
|
94
|
+
# We could wrap the streaming body in a Deflate stream, but that would require an extra stream wrapper which we don't have right now. See also `Digestable#stream?`.
|
95
|
+
false
|
96
|
+
end
|
97
|
+
|
92
98
|
def read
|
93
99
|
return if @stream.finished?
|
94
100
|
|
@@ -25,15 +25,6 @@ require_relative '../middleware'
|
|
25
25
|
module Protocol
|
26
26
|
module HTTP
|
27
27
|
class Middleware
|
28
|
-
module NotFound
|
29
|
-
def self.close
|
30
|
-
end
|
31
|
-
|
32
|
-
def self.call(request)
|
33
|
-
Response[404, Headers[], []]
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
28
|
class Builder
|
38
29
|
def initialize(default_app = NotFound)
|
39
30
|
@use = []
|
@@ -55,25 +55,25 @@ module Protocol
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def self.call(request)
|
58
|
-
Response[200
|
58
|
+
Response[200]
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
-
module
|
62
|
+
module NotFound
|
63
63
|
def self.close
|
64
64
|
end
|
65
65
|
|
66
66
|
def self.call(request)
|
67
|
-
Response[
|
67
|
+
Response[404]
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
-
module
|
71
|
+
module HelloWorld
|
72
72
|
def self.close
|
73
73
|
end
|
74
74
|
|
75
75
|
def self.call(request)
|
76
|
-
Response[
|
76
|
+
Response[200, Headers['content-type' => 'text/plain'], ["Hello World!"]]
|
77
77
|
end
|
78
78
|
end
|
79
79
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protocol-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.23.
|
4
|
+
version: 0.23.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -41,7 +41,7 @@ cert_chain:
|
|
41
41
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
42
42
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
43
43
|
-----END CERTIFICATE-----
|
44
|
-
date: 2022-08-
|
44
|
+
date: 2022-08-31 00:00:00.000000000 Z
|
45
45
|
dependencies:
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: bundler
|
metadata.gz.sig
CHANGED
Binary file
|