File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
lib/seahorse/client/plugins Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,9 @@ def parse_response(response)
69
69
status_code = response . context . http_response . status_code
70
70
response . data [ key ] = status_code
71
71
when 'header'
72
- response . data [ key ] = extract_header ( headers , shape )
72
+ if headers . key? ( shape . location_name )
73
+ response . data [ key ] = extract_header ( headers , shape )
74
+ end
73
75
when 'headers'
74
76
response . data [ key ] = extract_header_map ( headers , shape )
75
77
end
Original file line number Diff line number Diff line change @@ -195,13 +195,15 @@ module ClientStubs
195
195
196
196
it 'stubs the HTTP response target when with streaming APIs' do
197
197
s3 = S3 ::Client . new ( stub_responses : true )
198
- s3 . stub_responses ( :get_object , { body : 'data' } )
198
+ s3 . stub_responses ( :get_object , { body : 'data' , content_length : 4 } )
199
199
io = StringIO . new
200
200
resp = s3 . get_object ( bucket :'bucket' , key :'key' , response_target : io )
201
201
expect ( resp . body . read ) . to eq ( 'data' )
202
202
expect ( resp . body ) . to be ( io )
203
203
expect ( resp . context . http_response . body ) . to be ( io )
204
+ expect ( resp . content_length ) . to eq ( 4 )
204
205
end
206
+
205
207
end
206
208
end
207
209
end
You can’t perform that action at this time.
0 commit comments