From 2802f75fa2f1c986adb1506c39a07ae1595ed3b4 Mon Sep 17 00:00:00 2001 From: gardners Date: Sun, 15 Feb 2015 17:48:47 +1030 Subject: [PATCH] allow blank format field in post, so that libcurl can be used to insert rhizome bundles. --- rhizome_restful.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rhizome_restful.c b/rhizome_restful.c index 07c2b132..8eafa5bb 100644 --- a/rhizome_restful.c +++ b/rhizome_restful.c @@ -425,7 +425,8 @@ static int insert_mime_part_header(struct http_request *hr, const struct mime_pa || strcmp(h->content_type.subtype, "manifest") != 0 ) return http_response_form_part(r, "Unsupported Content-Type in", PART_MANIFEST, NULL, 0); - if (strcmp(h->content_type.format, "text+binarysig") != 0) + if ((strcmp(h->content_type.format, "text+binarysig") != 0) + &&strlen(h->content_type.format)) return http_response_form_part(r, "Unsupported rhizome/manifest format in", PART_MANIFEST, NULL, 0); r->u.insert.current_part = PART_MANIFEST; }