hashicorp / terraform-provider-http

Utility provider for interacting with generic HTTP servers as part of a Terraform configuration.
https://registry.terraform.io/providers/hashicorp/http/latest
Mozilla Public License 2.0
206 stars 116 forks source link

Support for application/samlmetadata+xml #258

Open cdobbyn opened 1 year ago

cdobbyn commented 1 year ago

Terraform CLI and Provider Versions

Terraform v1.3.9 on linux_amd64

Use Cases or Problem Statement

This is a text type, not binary data. The accept type is actually: application/samlmetadata+xml;charset=ISO-8859-1

This simply displays a warning, and that's fine I can live with that. I imagine I'm not the only person who's confused by this not being included.

In my case I'm getting metadata from Okta and passing it into aws to provision the identity provider in there.

Proposal

My preference would be this doesn't show a warning, this return type is a valid xml document.

How much impact is this issue causing?

Low

Additional Information

This is more annoying than an issue, I've marked the impact low as a result of this.

Code of Conduct

bendbennett commented 1 year ago

Hi @cdobbyn 👋

Thank you for raising this issue. It looks like application/samlmetadata+xml would be recognised as a text type by the regular expression check but that the charset for ISO-8859-1 is not present in the list of charsets that are checked.

We will consider modifying the list of charsets alongside any other updates that modify the behaviour of the checking of the Content-Type.