Bug 1472847 - dnf install dosn't handle 'Location:' http header
dnf install dosn't handle 'Location:' http header
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
26
Unspecified Unspecified
low Severity unspecified
: ---
: ---
Assigned To: Jaroslav Mracek
Fedora Extras Quality Assurance
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-19 10:01 EDT by jniederm
Modified: 2017-10-10 15:30 EDT (History)
6 users (show)

See Also:
Fixed In Version: dnf-2.7.3-1.fc26 dnf-2.7.3-1.fc27
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-10-08 04:27:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description jniederm 2017-07-19 10:01:06 EDT
Description of problem:
When installing a package from http location, `dnf install` doesn't handle http redirection expressed by 'Location:' http header.

Version-Release number of selected component (if applicable):
dnf-2.5.1-1.fc26.noarch

How reproducible:
100%

Steps to Reproduce:
1. dnf install https://atom.io/download/rpm

Actual results:
Last metadata expiration check: 0:06:52 ago on Wed Jul 19 13:04:23 2017.
No package https://atom.io/download/rpm available.
Error: Unable to find a match

Expected results:
package is offered for installation with resolved dependencies

Additional info:
it works with manually resolver url: dnf install 'https://atom-installer.github.com/v1.18.0/atom.x86_64.rpm?s=1497483731&ext=.rpm'

$ http https://atom.io/download/rpmHTTP/1.1 302 Found
Cache-Control: no-cache
Connection: close
Content-Security-Policy: default-src 'self'; connect-src 'self'; font-src https://github-atom-io-herokuapp-com.global.ssl.fastly.net; frame-src 'self' https://www.youtube.com; img-src https://* 'self' https://github-atom-io-herokuapp-com.global.ssl.fastly.net data:; media-src 'self'; object-src 'self' https://github-atom-io-herokuapp-com.global.ssl.fastly.net; script-src 'self' 'unsafe-inline' https://ssl.google-analytics.com https://www.google-analytics.com https://platform.twitter.com https://github-atom-io-herokuapp-com.global.ssl.fastly.net; style-src 'self' 'unsafe-inline' https://github-atom-io-herokuapp-com.global.ssl.fastly.net;
Content-Type: text/html; charset=utf-8
Date: Wed, 19 Jul 2017 13:59:35 GMT
Location: https://atom-installer.github.com/v1.18.0/atom.x86_64.rpm?s=1497483731&ext=.rpm
Server: Cowboy
Status: 302 Found
Strict-Transport-Security: max-age=631152000
Via: 1.1 vegur
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Rack-Cache: miss
X-Request-Id: bba84816-1ddb-4432-94cc-82a3026ba699
X-Runtime: 0.006117
X-Xss-Protection: 1; mode=block

<html><body>You are being <a href="https://atom-installer.github.com/v1.18.0/atom.x86_64.rpm?s=1497483731&amp;ext=.rpm">redirected</a>.</body></html>


$ http 'https://atom-installer.github.com/v1.18.0/atom.x86_64.rpm?s=1497483731&ext=.rpm'
HTTP/1.1 200 OK
Accept-Ranges: bytes
Connection: keep-alive
Content-Length: 128551353
Content-Type: application/octet-stream
Date: Wed, 19 Jul 2017 14:00:01 GMT
ETag: "330658dca5740290e461a617386625cc-25"
Last-Modified: Wed, 14 Jun 2017 23:42:14 GMT
Server: AmazonS3
Via: 1.1 varnish
X-Cache: HIT
X-Cache-Hits: 0
X-Served-By: cache-ams4447-AMS
X-Timer: S1500472801.280472,VS0,VE1
x-amz-id-2: dqwCDVYxHQ8pGEOJVs2VW3bfz9aKf3AEAD4FyZzvADX/lwl7zeTovW317zkqkNjuZR8F2ZEeDsQ=
x-amz-request-id: E0E279692A01927C



+-----------------------------------------+
| NOTE: binary data not shown in terminal |
+-----------------------------------------+
Comment 1 Jaroslav Mracek 2017-07-24 15:25:54 EDT
What If I will note that dnf handles argument like that only arguments that end up with ".rpm" are recognized as rpm file. The rest is handled as NEVRA, provide or file provide.
Comment 2 Jaroslav Mracek 2017-08-15 12:06:43 EDT
I created a patch that should solve reported problem (https://github.com/rpm-software-management/dnf/pull/898). Thanks for report.
Comment 3 Fedora Update System 2017-10-06 11:58:48 EDT
dnf-2.7.3-1.fc27 dnf-plugins-core-2.1.5-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-bb3b9775cc
Comment 4 Fedora Update System 2017-10-06 11:59:09 EDT
dnf-2.7.3-1.fc26 dnf-plugins-core-2.1.5-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-0f2730a8c2
Comment 5 Fedora Update System 2017-10-08 02:23:27 EDT
dnf-2.7.3-1.fc27, dnf-plugins-core-2.1.5-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-bb3b9775cc
Comment 6 Fedora Update System 2017-10-08 04:27:36 EDT
dnf-2.7.3-1.fc26, dnf-plugins-core-2.1.5-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.
Comment 7 Fedora Update System 2017-10-10 15:30:21 EDT
dnf-2.7.3-1.fc27, dnf-plugins-core-2.1.5-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.