restore .bin-suffix for nameless PUT/POSTs

disappeared in v1.0.11
This commit is contained in:
ed 2022-09-03 19:59:59 +02:00
parent c930d8f773
commit 799cf27c5d

View file

@ -778,6 +778,10 @@ class HttpCli(object):
self.log("fallthrough? thats a bug", 1) self.log("fallthrough? thats a bug", 1)
suffix = "-{:.6f}-{}".format(time.time(), self.dip) suffix = "-{:.6f}-{}".format(time.time(), self.dip)
if not fn:
suffix += ".bin"
fn = "put" + suffix
params = {"suffix": suffix, "fdir": fdir} params = {"suffix": suffix, "fdir": fdir}
if self.args.nw: if self.args.nw:
params = {} params = {}
@ -785,9 +789,6 @@ class HttpCli(object):
params.update(open_ka) params.update(open_ka)
if not fn:
fn = "put" + suffix
with ren_open(fn, *open_a, **params) as zfw: with ren_open(fn, *open_a, **params) as zfw:
f, fn = zfw["orz"] f, fn = zfw["orz"]
path = os.path.join(fdir, fn) path = os.path.join(fdir, fn)