fixup! Merge branch 'main' of github.com:tus/tusd into v2

This commit is contained in:
Marius Kleidl 2023-06-09 12:34:10 +02:00
parent 633a088870
commit 899b4f9d98
No known key found for this signature in database
GPG Key ID: 2F8AC5B12D755265
1 changed files with 6 additions and 0 deletions

View File

@ -13,6 +13,12 @@ type HookEvent struct {
}
func newHookEvent(info FileInfo, r *http.Request) HookEvent {
// The Host header field is not present in the header map, see https://pkg.go.dev/net/http#Request:
// > For incoming requests, the Host header is promoted to the
// > Request.Host field and removed from the Header map.
// That's why we add it back manually.
r.Header.Set("Host", r.Host)
return HookEvent{
Upload: info,
HTTPRequest: HTTPRequest{