From 90c085e197ee9fb8c7a417a606e00f1fe0eabd83 Mon Sep 17 00:00:00 2001 From: Luis Madrigal <599908+Madrigal@users.noreply.github.com> Date: Mon, 7 Oct 2024 12:43:33 -0400 Subject: [PATCH] fix: allow empty headers on prefix headers (#544) --- .../codegen/integration/HttpBindingProtocolGenerator.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/integration/HttpBindingProtocolGenerator.java b/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/integration/HttpBindingProtocolGenerator.java index 3049a0b2..f3ced75e 100644 --- a/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/integration/HttpBindingProtocolGenerator.java +++ b/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/integration/HttpBindingProtocolGenerator.java @@ -877,11 +877,8 @@ private void writeHttpBindingMember( writer.write("hv := encoder.Headers($S)", getCanonicalHeader(locationName)); writer.addUseImports(SmithyGoDependency.NET_HTTP); writer.openBlock("for mapKey, mapVal := range $L {", "}", operand, () -> { - GoValueAccessUtils.writeIfNonZeroValue(context.getModel(), writer, valueMemberShape, - "mapVal", false, false, () -> { - writeHeaderBinding(context, valueMemberShape, "mapVal", location, - "http.CanonicalHeaderKey(mapKey)", "hv"); - }); + writeHeaderBinding(context, valueMemberShape, "mapVal", location, + "http.CanonicalHeaderKey(mapKey)", "hv"); }); break; case LABEL: