File tree Expand file tree Collapse file tree 2 files changed +0
-31
lines changed Expand file tree Collapse file tree 2 files changed +0
-31
lines changed Original file line number Diff line number Diff line change @@ -462,7 +462,6 @@ def before_sending
462
462
# our last chance.
463
463
commit! unless committed?
464
464
465
- @headers . freeze
466
465
@request . commit_cookie_jar! unless committed?
467
466
end
468
467
Original file line number Diff line number Diff line change @@ -86,36 +86,6 @@ def test_content_length_is_removed
86
86
@response . stream . write "omg"
87
87
assert_nil @response . headers [ "Content-Length" ]
88
88
end
89
-
90
- def test_headers_cannot_be_written_after_web_server_reads
91
- @response . stream . write "omg"
92
- latch = Concurrent ::CountDownLatch . new
93
-
94
- t = Thread . new {
95
- @response . each do
96
- latch . count_down
97
- end
98
- }
99
-
100
- latch . wait
101
- assert_predicate @response . headers , :frozen?
102
- assert_raises ( FrozenError ) do
103
- @response . headers [ "Content-Length" ] = "zomg"
104
- end
105
-
106
- @response . stream . close
107
- t . join
108
- end
109
-
110
- def test_headers_cannot_be_written_after_close
111
- @response . stream . close
112
- # we can add data until it's actually written, which happens on `each`
113
- @response . each { |x | }
114
-
115
- assert_raises ( FrozenError ) do
116
- @response . headers [ "Content-Length" ] = "zomg"
117
- end
118
- end
119
89
end
120
90
end
121
91
end
You can’t perform that action at this time.
0 commit comments