From 881b07fb157981e0cc446bbcc44b66c37d8633f2 Mon Sep 17 00:00:00 2001 From: nixo Date: Tue, 21 May 2019 19:27:58 +0200 Subject: [PATCH] re-add content lenght --- JlSonic/api.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/JlSonic/api.jl b/JlSonic/api.jl index b83d761..3100612 100644 --- a/JlSonic/api.jl +++ b/JlSonic/api.jl @@ -520,8 +520,9 @@ function giveconverted(file, bitrate, format) mime = suffix in keys(Mux.mimetypes) ? Mux.mimetypes[suffix] : "application/octet-stream" headers["Content-Type"] = mime - # headers["Content-Length"] = string(length(data)) - return Dict(:body => take!(iodata), + data = take!(iodata) + headers["Content-Length"] = string(length(data)) + return Dict(:body => data, :headers => headers, :file => join([split(basename(file), '.')[1:end-1], ".oga"],""))