salt.utils.http.query results not consistent across backends.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description of Issue/Question
salt.utils.http.query result ouput not consistent across backends.
The following is inside salt.utils.http.query
if not backend:
backend = opts.get('backend', 'tornado')
salt.utils.http.query returns a dict. This dict always contains handle. However handle can be:
- requests.models.Response from requests.Session()
- tornado.httpclient.HTTPResponse from tornado
It appears backend set to urllib2 may not work.
salt.utils.http.query should return a consistent result. e.g.
{
response_headers: [list in order received]
response_status: <User friendly message>
body: <response>
size: <int>
Optionally consider some of the standard response hearders like Etag, Last-Modified, Data, Content-Type, Content-Length, Expires, Host, Cache-Control
}
Setup
Steps to Reproduce Issue
Change backend and run the test suite. Or use fileclient.get_url()
Versions Report
Development, 2018.X 2017.X
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with salt.utils.http.query and reproduce the issue by changing the backend, then inspect the results from fileclient.get_url() and the test suite. Compare the returned values across the requests, tornado, and urllib2 paths; done means the backends expose a consistent result and the relevant tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100