Skip to content

salt.utils.http.query results not consistent across backends. #47962

@damon-atkins

Description

@damon-atkins

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ConfirmedSalt engineer has confirmed bug/feature - often including a MCVEbugbroken, incorrect, or confusing behaviorhelp-wantedCommunity help is needed to resolve thispending-community-assignmentPending community contributor assignmentseverity-low4th level, cosemtic problems, work around exists

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions