From 325228e1e84f358d555eaeb9e06a1f9b62a33f9d Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Tue, 7 Jan 2020 17:59:07 +0000 Subject: [PATCH] Add Http_Transfer_Encoding This affects serializing and streaming modes and lets the caller know what the encoding mode is when that is set. For instance if the value is "chunked", the Http_Content_Length must be ignored. Closes: #89 Signed-off-by: Alex Ellis (OpenFaaS Ltd) --- main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.go b/main.go index 6d1b2ce6..036372d0 100644 --- a/main.go +++ b/main.go @@ -315,6 +315,10 @@ func getEnvironment(r *http.Request) []string { envs = append(envs, fmt.Sprintf("Http_Path=%s", r.URL.Path)) } + if len(r.TransferEncoding) > 0 { + envs = append(envs, fmt.Sprintf("Http_Transfer_Encoding=%s", r.TransferEncoding[0])) + } + return envs }