diff --git a/http/codegen/server.go b/http/codegen/server.go index 63f5b47ebb..7cc5a03bec 100644 --- a/http/codegen/server.go +++ b/http/codegen/server.go @@ -1335,7 +1335,7 @@ const responseT = `{{ define "response" -}} {{ .VarName }} := "{{ printValue .Type .DefaultValue }}" {{- end }} http.SetCookie(w, &http.Cookie{ - Name: {{ printf "%q" .Name }}, + Name: {{ printf "%q" .HTTPName }}, Value: {{ .VarName }}, {{- if .MaxAge }} MaxAge: {{ .MaxAge }},