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!
183183 end
184184
185185 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
186189 end
187190
188191 # Release any resources used by this command
Original file line number Diff line number Diff line change 118118--123abc--
119119
120120EOF
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
122125 end
123126
124127 it 'should send content with authorization header when set' do
You can’t perform that action at this time.
0 commit comments