Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B763A200C5B for ; Thu, 27 Apr 2017 11:44:48 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B6287160B98; Thu, 27 Apr 2017 09:44:48 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 16B2C160BB2 for ; Thu, 27 Apr 2017 11:44:47 +0200 (CEST) Received: (qmail 71599 invoked by uid 500); 27 Apr 2017 09:44:47 -0000 Mailing-List: contact commits-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list commits@brooklyn.apache.org Received: (qmail 71557 invoked by uid 99); 27 Apr 2017 09:44:47 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Apr 2017 09:44:47 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 2306BE04B1; Thu, 27 Apr 2017 09:44:47 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: geomacy@apache.org To: commits@brooklyn.apache.org Date: Thu, 27 Apr 2017 09:44:49 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [3/6] brooklyn-client git commit: set content type to unknown to use auto-detect when posting to catalog archived-at: Thu, 27 Apr 2017 09:44:48 -0000 set content type to unknown to use auto-detect when posting to catalog (prevent reader error if the item is a zip) Project: http://git-wip-us.apache.org/repos/asf/brooklyn-client/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-client/commit/e974f738 Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-client/tree/e974f738 Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-client/diff/e974f738 Branch: refs/heads/master Commit: e974f7383a5f662f6089c8fa9d877667e56e6505 Parents: 2094e82 Author: Alex Heneveld Authored: Mon Apr 24 15:06:35 2017 +0100 Committer: Alex Heneveld Committed: Mon Apr 24 15:13:30 2017 +0100 ---------------------------------------------------------------------- cli/api/catalog/catalog.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/e974f738/cli/api/catalog/catalog.go ---------------------------------------------------------------------- diff --git a/cli/api/catalog/catalog.go b/cli/api/catalog/catalog.go index bbd7bf6..5cfefc3 100644 --- a/cli/api/catalog/catalog.go +++ b/cli/api/catalog/catalog.go @@ -219,9 +219,8 @@ func AddCatalog(network *net.Network, resource string) (map[string]models.Catalo urlString := "/v1/catalog" var entities map[string]models.CatalogEntitySummary - //Assume application/json. This is correct for http/file resources. - //Zips will need application/x-zip - contentType := "application/json" + //Force auto-detect by default + contentType := "application/octet-stream" u, err := url.Parse(resource) if err != nil { return nil, err