Skip to content

Commit

Permalink
Add Http_Transfer_Encoding
Browse files Browse the repository at this point in the history
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) <[email protected]>
  • Loading branch information
alexellis committed Jan 7, 2020
1 parent 32a2318 commit 325228e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 325228e

Please sign in to comment.