-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
http provider too strict with application/json content type #15164
Comments
Thanks for reporting this, @sebastien-prudhomme! The RFC for the Looking at this again here, I also see that we're not correctly handling the
|
Although we're not necessarily reading HTML here, it seems like we could use |
Any reference for your RFC? The RFC for HTTP1/1 "Content-Type" says you can have a charset after the mime type, so i think there is not a problem with the server (which is OpenStack metadata web service): https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7 |
The
It also says:
...which seems to excuse your server, I suppose! But as I'd said above, we can be pragmatic about this and just ignore it, since Terraform doesn't employ a team of RFC lawyers. 😀 |
Is there a way to use http provider with S3? It gives binary/octet-stream for most files. |
Is there a reason i cannot use zip files with the http data source? |
I just ran into this issue trying to get the Azure JSON list of service tags and public IPs. The content-type is application/octet-stream. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Terraform Version
0.9.7
Affected Resource(s)
"http" datasource
Terraform Configuration Files
Actual Behavior
Not working:
In source code builtin/providers/http/data_source.go:
The regexp for "application/json" is too strict, as the charset can also be included by the web server
The text was updated successfully, but these errors were encountered: