From d68dc4d27e0d5299f9576804959aa48eaed24145 Mon Sep 17 00:00:00 2001 From: Steven Bazyl Date: Fri, 31 May 2013 15:41:00 -0700 Subject: [PATCH] Don't attempt resumable upload if initial response failed (Issue #32) --- lib/google/api_client/request.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/google/api_client/request.rb b/lib/google/api_client/request.rb index b2ff854389..3e90ea7188 100644 --- a/lib/google/api_client/request.rb +++ b/lib/google/api_client/request.rb @@ -165,7 +165,7 @@ module Google # Resumamble slightly different than other upload protocols in that it requires at least # 2 requests. - if self.upload_type == 'resumable' + if result.status == 200 && self.upload_type == 'resumable' upload = result.resumable_upload unless upload.complete? logger.debug { "#{self.class} Sending upload body" } -- 2.30.2