From 9e365661f04bc5d54865f089b474bae8d6de731d Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Wed, 13 Oct 2021 13:27:09 +0200 Subject: [PATCH] fix(oohelperd): return HTTP headers as empty map on error (#541) Part of https://github.com/ooni/probe/issues/1707 --- internal/cmd/oohelperd/internal/webconnectivity/http.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/cmd/oohelperd/internal/webconnectivity/http.go b/internal/cmd/oohelperd/internal/webconnectivity/http.go index b661583..87180db 100644 --- a/internal/cmd/oohelperd/internal/webconnectivity/http.go +++ b/internal/cmd/oohelperd/internal/webconnectivity/http.go @@ -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 }