Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lost mime type on downloads from activities.sugarlabs.org #48

Closed
quozl opened this issue Apr 1, 2017 · 4 comments
Closed

lost mime type on downloads from activities.sugarlabs.org #48

quozl opened this issue Apr 1, 2017 · 4 comments

Comments

@quozl
Copy link
Contributor

quozl commented Apr 1, 2017

Reproducer:

  • click on activities,
  • download an activity,
  • view in journal,
  • switch to detail view,
  • examine mime type "Kind" and try to open the entry.

Expected result:

  • application/vnd.olpc-sugar
  • activity is installed and runs

Observed result:

  • application/octet-stream
  • No activity to start entry

Versions: Affects Browse-200. Browse-157 works fine.

Impact: critical, as it breaks activities.sugarlabs.org for current version of Browse in Ubuntu, Debian, Raspbian and Fedora.

Reported by @Rishabh42.

@quozl
Copy link
Contributor Author

quozl commented Apr 25, 2017

@icarito, possibly same as Debian #861052?

@quozl
Copy link
Contributor Author

quozl commented Apr 25, 2017

Immediate cause is that WebKit2 provides a Mime-Type of application/octet-stream. So journal entry has wrong Mime-Type.

Underlying this; activities.sugarlabs.org does not provide a Content-Type in response to the request; as shown by curl --dump-header of 4418/helloworld-6.xo;

HTTP/1.1 200 OK
Date: Tue, 25 Apr 2017 08:10:45 GMT
Server: Sugar Server
Last-Modified: Thu, 26 Apr 2012 13:17:00 GMT
ETag: "29b8-4be94cd9dc9e7"
Accept-Ranges: bytes
Content-Length: 10680

And also according to tcpdump.

And also the same for Browse-157.3 based on earlier WebKit.

Root cause is that Browse-200 gets Mime-Type from network headers, and because earlier WebKit did not provide it Browse-157.3 uses sugar3.mime.get_for_file() using the destination path. get_for_file calls Gio.content_type_guess.

Is a regression from Browse-157.3 to Browse-200.

@quozl
Copy link
Contributor Author

quozl commented Apr 30, 2017

@quozl
Copy link
Contributor Author

quozl commented May 2, 2017

Fixed in 16d9671

@quozl quozl closed this as completed May 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant