From 06550d3a55f4389c62ac392647859ab40d1dbe94 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 1 Apr 2021 17:49:11 +0800 Subject: [PATCH] disable resumable downloads for CLIs They cause issues now that we can't represent them anymore via the call-type protocol enumeration. Something went wrong there and it's not worth fixing it on CLI side (probably nobody uses them) even though they *were* good for debugging one previously. --- src/mako/lib/cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mako/lib/cli.py b/src/mako/lib/cli.py index 58b196cdce..514d253a17 100644 --- a/src/mako/lib/cli.py +++ b/src/mako/lib/cli.py @@ -91,7 +91,8 @@ def new_method_context(resource, method, c): m = c.fqan_map[util.to_fqan(c.rtc_map[resource], resource, method)] response_schema = util.method_response(c, m) params, request_value = util.build_all_params(c, m) - media_params = util.method_media_params(m) + # let CLIs not support resumable downloads or uploads for now, but don't affect the APIs + media_params = list(filter(lambda mp: mp.protocol == "simple", util.method_media_params(m))) required_props, optional_props, part_prop = util.organize_params(params, request_value) return MethodContext(m, response_schema, params, request_value, media_params,