brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From geom...@apache.org
Subject [3/6] brooklyn-client git commit: set content type to unknown to use auto-detect when posting to catalog
Date Thu, 27 Apr 2017 09:44:49 GMT
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 <alex.heneveld@cloudsoftcorp.com>
Authored: Mon Apr 24 15:06:35 2017 +0100
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
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


Mime
View raw message