We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 67b3e8e commit d0d03caCopy full SHA for d0d03ca
lib/protocol/http/header/connection.rb
@@ -22,7 +22,7 @@ def << value
22
end
23
24
def keep_alive?
25
- self.include?(KEEP_ALIVE)
+ self.include?(KEEP_ALIVE) && !close?
26
27
28
def close?
test/protocol/http/header/connection.rb
@@ -29,6 +29,13 @@
29
30
31
32
+ with "close, keep-alive" do
33
+ it "should prioritize close over keep-alive" do
34
+ expect(header).to be(:close?)
35
+ expect(header).not.to be(:keep_alive?)
36
+ end
37
38
+
39
with "upgrade" do
40
it "should indiciate connection can be upgraded" do
41
expect(header).to be(:upgrade?)
0 commit comments