diff --git a/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/generators/http/HttpBindingGenerator.kt b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/generators/http/HttpBindingGenerator.kt index d4aa4b707c..5c69047fa5 100644 --- a/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/generators/http/HttpBindingGenerator.kt +++ b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/generators/http/HttpBindingGenerator.kt @@ -620,7 +620,7 @@ class HttpBindingGenerator( rustTemplate( """ // Empty vecs in headers are serialized as the empty string - if ${context.valueExpression.asRef()}.is_empty() { + if ${context.valueExpression.name}.is_empty() { builder = builder.header("$headerName", ""); }""", )