diff --git a/httpreplay/cmd/httpr/integration_test.go b/httpreplay/cmd/httpr/integration_test.go index 1a8d84d6efc9..b9a2ecfb9a14 100644 --- a/httpreplay/cmd/httpr/integration_test.go +++ b/httpreplay/cmd/httpr/integration_test.go @@ -149,8 +149,6 @@ func start(modeFlag, filename string) (*exec.Cmd, *http.Transport, string, error modeFlag, filename, "-debug-headers", - "-ignore-header", "X-Goog-Api-Client", - "-ignore-header", "X-Goog-Gcs-Idempotency-Token", ) if err := cmd.Start(); err != nil { return nil, nil, "", err diff --git a/httpreplay/httpreplay_test.go b/httpreplay/httpreplay_test.go index 2d595d9b36fa..b5a58fad6f9f 100644 --- a/httpreplay/httpreplay_test.go +++ b/httpreplay/httpreplay_test.go @@ -67,8 +67,6 @@ func TestIntegration_RecordAndReplay(t *testing.T) { if err != nil { t.Fatal(err) } - rec.RemoveRequestHeaders("X-Goog-Api-Client") - rec.RemoveRequestHeaders("X-Goog-Gcs-Idempotency-Token") hc, err := rec.Client(ctx, option.WithTokenSource( testutil.TokenSource(ctx, storage.ScopeFullControl))) @@ -86,8 +84,6 @@ func TestIntegration_RecordAndReplay(t *testing.T) { if err != nil { t.Fatal(err) } - rep.IgnoreHeader("X-Goog-Api-Client") - rep.IgnoreHeader("X-Goog-Gcs-Idempotency-Token") defer rep.Close() hc, err = rep.Client(ctx) if err != nil { diff --git a/httpreplay/internal/proxy/converter.go b/httpreplay/internal/proxy/converter.go index f1a6c70fd142..46966e4f376e 100644 --- a/httpreplay/internal/proxy/converter.go +++ b/httpreplay/internal/proxy/converter.go @@ -79,8 +79,9 @@ var ( "Via", "X-Forwarded-*", // Google-specific - "X-Cloud-Trace-Context", // OpenCensus traces have a random ID - "X-Goog-Api-Client", // can differ for, e.g., different Go versions + "X-Cloud-Trace-Context", // OpenCensus traces have a random ID + "X-Goog-Api-Client", // can differ for, e.g., different Go versions + "X-Goog-Gcs-Idempotency-Token", // Used by Cloud Storage } defaultRemoveBothHeaders = []string{