Remove dead code. We're guaranteed to have CURLE_OK because we return early above.
authorJonathan Hseu <jhseu@google.com>
Wed, 7 Mar 2018 01:53:08 +0000 (17:53 -0800)
committerTensorFlower Gardener <gardener@tensorflow.org>
Wed, 7 Mar 2018 01:56:46 +0000 (17:56 -0800)
PiperOrigin-RevId: 188110480

tensorflow/core/platform/cloud/curl_http_request.cc

index b4e1193..35bdcba 100644 (file)
@@ -529,16 +529,9 @@ Status CurlHttpRequest::Send() {
     case 201:  // Created
     case 204:  // No Content
     case 206:  // Partial Content
-      if (curl_result != CURLE_OK) {
-        // This means the server executed the request successfully, but then
-        // something went wrong during the transmission of the response.
-        result = errors::Unavailable(response_to_error_message(
-            response_code_, GetResponse(), response_to_error_limit_,
-            curl_result, error_buffer));
-      } else {
-        result = Status::OK();
-      }
+      result = Status::OK();
       break;
+
     case 416:  // Requested Range Not Satisfiable
       // The requested range had no overlap with the available range.
       // This doesn't indicate an error, but this does mean an empty response