Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not/allow users to opt out canonical header keys in autorest.WithHeaders #721

Open
magodo opened this issue Mar 3, 2023 · 1 comment

Comments

@magodo
Copy link

magodo commented Mar 3, 2023

Currently, the function autorest.WithHeaders always canonical header keys:

// WithHeaders returns a PrepareDecorator that sets the specified HTTP headers of the http.Request to
// the passed value. It canonicalizes the passed headers name (via http.CanonicalHeaderKey) before
// adding them.
func WithHeaders(headers map[string]interface{}) PrepareDecorator {

Some data plane API (e.g. storage) communicates resource properties via header, the canonical here makes those key case insensitive, while sometimes they do allow sensitive. One example can be found here: hashicorp/terraform-provider-azurerm#20737

@jhendrixMSFT
Copy link
Member

go-autorest is almost end-of-life and is only taking critical bugfixes. This functionality has been like this for years, so I don't think we'd change it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants