ansible / mazer

Experimental Ansible Galaxy Content Manager
GNU General Public License v3.0
114 stars 18 forks source link

(tmp) Fix 'publish' to galaxy-dev (and any https api) #219

Closed alikins closed 5 years ago

alikins commented 5 years ago

The publish_file() method was ignoring the galaxy server url scheme and always using 'http' connections (even for https:// urls like https://galaxy-dev.ansible.com) And for https only server (like galaxy-dev) that redirect http requests to https urls, this would fail because of an unhandled '302 Found' redirect response.

publish_file() uses a http client based on 'http.client', while the rest of mazer uses the flat_rest_api.urls.open_url() method. So the incorrect use of http only affects publish_file()

This is a tmp fix until this and ansible_galaxy.rest_api is ported to requests.

alikins commented 5 years ago

See https://github.com/alikins/mazer/tree/use_requests for the WIP port to requests for the longer term fix.