From 17b8cd738fe0d56a9b1b1d80c73918e59eafff56 Mon Sep 17 00:00:00 2001 From: Sam O'Connor Date: Thu, 18 Jan 2018 23:50:47 +1100 Subject: [PATCH] payload fixes --- src/Messages.jl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Messages.jl b/src/Messages.jl index 9061227eb..f8d98a4eb 100644 --- a/src/Messages.jl +++ b/src/Messages.jl @@ -395,12 +395,11 @@ end load(m::Message) = payload(m, String) payload(m::Message)::Vector{UInt8} = - (enc = hasheader(m, "Transfer-Encoding")) != "" ? decode(m, enc) : m.body + (enc = header(m, "Transfer-Encoding")) != "" ? decode(m, enc) : m.body payload(m::Message, ::Type{String}) = - hasheader(m, "Content-Type", "ISO-8859-1") ? - iso8859_1_to_utf8(payload(m)) : - String(payload(m)) + hasheader(m, "Content-Type", "ISO-8859-1") ? iso8859_1_to_utf8(payload(m)) : + String(payload(m)) function decode(m::Message, encoding::String)::Vector{UInt8} @warn "Decoding of HTTP Transfer-Encoding is not implemented yet!"