fix(oohelperd): return HTTP headers as empty map on error (#541)

Part of https://github.com/ooni/probe/issues/1707
This commit is contained in:
Simone Basso 2021-10-13 13:27:09 +02:00 committed by GitHub
parent 43c349fe38
commit 9e365661f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,6 +34,7 @@ func HTTPDo(ctx context.Context, config *HTTPConfig) {
BodyLength: -1,
Failure: newfailure(err),
StatusCode: -1,
Headers: map[string]string{},
}
return
}
@ -53,6 +54,7 @@ func HTTPDo(ctx context.Context, config *HTTPConfig) {
BodyLength: -1,
Failure: newfailure(err),
StatusCode: -1,
Headers: map[string]string{},
}
return
}