Repository: brooklyn-client Updated Branches: refs/heads/master be8051602 -> 5dc3c6c26
Set ContentType when adding .yaml and .bom files to the catalog Using application/x-yaml saves the Brooklyn server the hassle of guessing. At the moment it's too smart for its own good and gives useless errors about zipfiles when there are errors in yaml files. Project: http://git-wip-us.apache.org/repos/asf/brooklyn-client/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-client/commit/635328e2 Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-client/tree/635328e2 Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-client/diff/635328e2 Branch: refs/heads/master Commit: 635328e2b221bf2ab66cbe1336812b419b319cc1 Parents: be80516 Author: Sam Corbett <[email protected]> Authored: Wed Jul 19 16:11:14 2017 +0100 Committer: Sam Corbett <[email protected]> Committed: Wed Jul 19 16:11:14 2017 +0100 ---------------------------------------------------------------------- cli/api/catalog/catalog.go | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/635328e2/cli/api/catalog/catalog.go ---------------------------------------------------------------------- diff --git a/cli/api/catalog/catalog.go b/cli/api/catalog/catalog.go index d8132ca..c72c8ff 100644 --- a/cli/api/catalog/catalog.go +++ b/cli/api/catalog/catalog.go @@ -275,6 +275,8 @@ func AddCatalog(network *net.Network, resource string) (*models.CatalogBundleAdd } else if lowercaseExtension == ".jar" { contentType = "application/x-jar" urlString = urlStringWithDetail + } else if lowercaseExtension == ".yaml" || lowercaseExtension == ".bom" { + contentType = "application/x-yaml" } }
