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

Allow charset=utf-8 in response Content-Type #5

Merged
merged 1 commit into from
Sep 18, 2017

Conversation

mkjois
Copy link
Contributor

@mkjois mkjois commented Sep 18, 2017

Addresses #1 which clones hashicorp/terraform#15164. Uses mime for proper parsing.

Testing

2 new test cases which both working correctly after change:

  • allow response with Content-Type: text/plain; charset=utf-8
  • disallow response with Content-Type application/json; charset=utf-16

@apparentlymart
Copy link
Contributor

Thanks for working on this, @mkjois! This looks good to me.

@shan0809
Copy link

Hi i am trying to fetch data from external source using the http provider however it is failing with below err:

Error: Unsupported block type

on var.tf line 57, in data "http" "OMSAgent":
57: request_headers {

Blocks of type "request_headers" are not expected here. Did you mean to define
argument "request_headers"? If so, use the equals sign to assign it a value.

Releasing state lock. This may take a few moments...

Code :
data "http" "OMSAgent" {
url = "https://github.com/microsoft/OMS-Agent-for-Linux/blob/master/installer/scripts/onboard_agent.sh"
request_headers {
Accept = "text/plain"
}
}

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants