Return-Path: X-Original-To: apmail-deltacloud-commits-archive@www.apache.org Delivered-To: apmail-deltacloud-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8F4AF9E58 for ; Tue, 7 Feb 2012 13:52:02 +0000 (UTC) Received: (qmail 57332 invoked by uid 500); 7 Feb 2012 13:52:02 -0000 Delivered-To: apmail-deltacloud-commits-archive@deltacloud.apache.org Received: (qmail 57311 invoked by uid 500); 7 Feb 2012 13:52:02 -0000 Mailing-List: contact commits-help@deltacloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltacloud.apache.org Delivered-To: mailing list commits@deltacloud.apache.org Received: (qmail 57304 invoked by uid 99); 7 Feb 2012 13:52:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 13:52:01 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.114] (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 13:51:59 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 87DD131D157; Tue, 7 Feb 2012 13:51:38 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mfojtik@apache.org To: commits@deltacloud.apache.org X-Mailer: ASF-Git Admin Mailer Subject: git commit: Client: Added core 504 to list of catched error codes Message-Id: <20120207135138.87DD131D157@tyr.zones.apache.org> Date: Tue, 7 Feb 2012 13:51:38 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Updated Branches: refs/heads/master 3f9fa7593 -> c212ad545 Client: Added core 504 to list of catched error codes Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/c212ad54 Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/c212ad54 Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/c212ad54 Branch: refs/heads/master Commit: c212ad5454f40fd9e90698b61b5a75de0286c927 Parents: 3f9fa75 Author: Michal Fojtik Authored: Tue Feb 7 14:52:37 2012 +0100 Committer: Michal fojtik Committed: Tue Feb 7 14:52:37 2012 +0100 ---------------------------------------------------------------------- client/lib/deltacloud.rb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c212ad54/client/lib/deltacloud.rb ---------------------------------------------------------------------- diff --git a/client/lib/deltacloud.rb b/client/lib/deltacloud.rb index 81b7d3b..614eab2 100644 --- a/client/lib/deltacloud.rb +++ b/client/lib/deltacloud.rb @@ -367,7 +367,7 @@ module DeltaCloud if conf[:method].eql?(:post) resource = RestClient::Resource.new(conf[:path], :open_timeout => conf[:open_timeout], :timeout => conf[:timeout]) resource.send(:post, conf[:form_data], default_headers.merge(extended_headers)) do |response, request, block| - handle_backend_error(response) if [500, 502, 501, 401].include? response.code + handle_backend_error(response) if [500, 502, 501, 401, 504].include? response.code if response.respond_to?('body') yield response.body if block_given? else @@ -377,7 +377,7 @@ module DeltaCloud else resource = RestClient::Resource.new(conf[:path], :open_timeout => conf[:open_timeout], :timeout => conf[:timeout]) resource.send(conf[:method], default_headers.merge(extended_headers)) do |response, request, block| - handle_backend_error(response) if [500, 502, 501, 401].include? response.code + handle_backend_error(response) if [500, 502, 501, 504, 401].include? response.code if conf[:method].eql?(:get) and [301, 302, 307].include? response.code response.follow_redirection(request) do |response, request, block| if response.respond_to?('body')