File tree Expand file tree Collapse file tree 5 files changed +3
-37
lines changed Expand file tree Collapse file tree 5 files changed +3
-37
lines changed Original file line number Diff line number Diff line change @@ -28,18 +28,6 @@ def send_connection_preface(settings = [])
28
28
if @state == :new
29
29
@framer . write_connection_preface
30
30
31
- # We don't support RFC7540 priorities:
32
- if settings . is_a? ( Hash )
33
- settings = settings . dup
34
- else
35
- settings = settings . to_h
36
- end
37
-
38
- unless settings . key? ( Settings ::NO_RFC7540_PRIORITIES )
39
- settings = settings . dup
40
- settings [ Settings ::NO_RFC7540_PRIORITIES ] = 1
41
- end
42
-
43
31
send_settings ( settings )
44
32
45
33
yield if block_given?
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ module HTTP2
22
22
FRAMES = [
23
23
DataFrame ,
24
24
HeadersFrame ,
25
- nil , # PriorityFrame is deprecated / removed .
25
+ nil , # PriorityFrame is deprecated and ignored, instead consider using PriorityUpdateFrame instead .
26
26
ResetStreamFrame ,
27
27
SettingsFrame ,
28
28
PushPromiseFrame ,
Original file line number Diff line number Diff line change @@ -28,18 +28,6 @@ def read_connection_preface(settings = [])
28
28
if @state == :new
29
29
@framer . read_connection_preface
30
30
31
- # We don't support RFC7540 priorities:
32
- if settings . is_a? ( Hash )
33
- settings = settings . dup
34
- else
35
- settings = settings . to_h
36
- end
37
-
38
- unless settings . key? ( Settings ::NO_RFC7540_PRIORITIES )
39
- settings = settings . dup
40
- settings [ Settings ::NO_RFC7540_PRIORITIES ] = 1
41
- end
42
-
43
31
send_settings ( settings )
44
32
45
33
read_frame do |frame |
Original file line number Diff line number Diff line change 34
34
35
35
client_settings_frame = framer . read_frame
36
36
expect ( client_settings_frame ) . to be_a Protocol ::HTTP2 ::SettingsFrame
37
- expect ( client_settings_frame . unpack ) . to be == settings + [ [ Protocol :: HTTP2 :: Settings :: NO_RFC7540_PRIORITIES , 1 ] ]
37
+ expect ( client_settings_frame . unpack ) . to be == settings
38
38
39
39
# Fake (empty) server settings:
40
40
server_settings_frame = Protocol ::HTTP2 ::SettingsFrame . new
63
63
end . to raise_exception ( Protocol ::HTTP2 ::ProtocolError , message : be =~ /First frame must be Protocol::HTTP2::SettingsFrame/ )
64
64
end
65
65
66
- it "should send connection preface with no RFC7540 priorities" do
67
- server_settings_frame = client . send_connection_preface ( { } ) do
68
- client_settings_frame = server . read_connection_preface ( { } )
69
-
70
- expect ( client_settings_frame . unpack ) . to be == [ [ Protocol ::HTTP2 ::Settings ::NO_RFC7540_PRIORITIES , 1 ] ]
71
- end
72
-
73
- expect ( server_settings_frame . unpack ) . to be == [ [ Protocol ::HTTP2 ::Settings ::NO_RFC7540_PRIORITIES , 1 ] ]
74
- end
75
-
76
66
it "can generate a stream id" do
77
67
id = client . next_stream_id
78
68
expect ( id ) . to be == 1
Original file line number Diff line number Diff line change 78
78
# The server immediately sends its own settings frame...
79
79
frame = framer . read_frame
80
80
expect ( frame ) . to be_a Protocol ::HTTP2 ::SettingsFrame
81
- expect ( frame . unpack ) . to be == server_settings + [ [ Protocol :: HTTP2 :: Settings :: NO_RFC7540_PRIORITIES , 1 ] ]
81
+ expect ( frame . unpack ) . to be == server_settings
82
82
83
83
# And then it acknowledges the client settings:
84
84
frame = framer . read_frame
You can’t perform that action at this time.
0 commit comments