File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,9 @@ def prepare!
183
183
end
184
184
185
185
self . body = '' if self . body . nil? && [ :post , :put , :patch ] . include? ( method )
186
+ if defined? ( ::Google ::Apis ::Core ::CompositeIO ) && body . is_a? ( ::Google ::Apis ::Core ::CompositeIO )
187
+ header [ "Content-Length" ] ||= body . size . to_s
188
+ end
186
189
end
187
190
188
191
# Release any resources used by this command
Original file line number Diff line number Diff line change 118
118
--123abc--
119
119
120
120
EOF
121
- expect ( a_request ( :post , 'https://www.googleapis.com/batch' ) . with ( body : expected_body ) ) . to have_been_made
121
+ expect (
122
+ a_request ( :post , 'https://www.googleapis.com/batch' )
123
+ . with ( body : expected_body , headers : { "Content-Length" => expected_body . size . to_s } )
124
+ ) . to have_been_made
122
125
end
123
126
124
127
it 'should send content with authorization header when set' do
You can’t perform that action at this time.
0 commit comments