Project

General

Profile

action #68362

Click on link to *.qcow2 file display raw content inside the web browser

Added by ggardet_arm about 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Concrete Bugs
Target version:
Start date:
2020-06-23
Due date:
% Done:

0%

Estimated time:
Difficulty:

Description

If you click on a link to a qcow2 file on openqa.opensuse.org, it displays the raw content inside the web browser instead of starting a proper file download.

History

#1 Updated by okurz about 1 year ago

  • Project changed from openQA Infrastructure to openQA Project
  • Category set to Concrete Bugs

#2 Updated by okurz about 1 year ago

  • Target version set to Ready

#3 Updated by okurz about 1 year ago

  • Status changed from New to Feedback
  • Assignee set to okurz

I created https://github.com/os-autoinst/openQA/pull/3273 which ensures by test the content type of assets and such. However the test shows that 'application/octet-stream' is returned correctly already.

Checking directly on osd I can find:

okurz@openqa:~> curl --verbose http://localhost:9526/assets/hdd/SLES-12-SP2-x86_64-mru-install-minimal-with-addons-Build20180904-3.qcow2 2>&1  | grep -i 'content-type'
< Content-Type: application/octet-stream
okurz@openqa:~> curl --verbose http://localhost/assets/hdd/SLES-12-SP2-x86_64-mru-install-minimal-with-addons-Build20180904-3.qcow2 2>&1  | grep -i 'content-type'

So the file is served correctly by mojolicious but not anymore over the apache proxy.

Adding an explicit type in the apache config following https://httpd.apache.org/docs/2.4/mod/mod_mime.html#addtype works. I have done that for testing on openQA using apache and added a commit to https://github.com/os-autoinst/openQA/pull/3273

#4 Updated by okurz about 1 year ago

  • Status changed from Feedback to Resolved

merged and deployed. On the latest create_hdd_textmode I checked all logs, results and assets and can confirm that video, vars.json and *.txt open directly in a browser with no special configuration whereas *.tar.bz2, *.iso, *.virtualbox.box, *.sha256 and in particular *.qcow2 are offered for download.

Also available in: Atom PDF