Skip to content
This repository has been archived by the owner on May 22, 2021. It is now read-only.

Percentage is not displayed when downloading a .txt file #524

Closed
SoftVision-CiprianMuresan opened this issue Aug 17, 2017 · 5 comments
Closed
Labels
[QA]:Verified fixed Label for QA to mark verified fixed issues

Comments

@SoftVision-CiprianMuresan

[Notes]:

  • The issue is also reproducible on the Dev page.
  • The issue is not reproducible on the Prod page.
  • I've tried to reproduce this with many other files with different extensions and it seems to only happen with .txt files.

[Affected versions]:

  • Firefox Release, Beta, Nightly
  • Chrome

[Affected Platforms]:

  • All Windows
  • All Mac
  • All Linux

[Steps to reproduce]:

  1. Open the browser and navigate to https://send.stage.mozaws.net/.
  2. Upload a file .txt file (>100kb) and copy the download link.
  3. Paste the link in a new tab and press enter.
  4. Click the "Download" button and observe the behavior.

[Expected result]:

  • Download percentage is displayed.

[Actual results]:

  • Only the "%" symbol is displayed.

[Additional notes]:

  • Here is a screen recording shot of the issue on Stage and Dev:
    only percentage is shown
@ehuggett
Copy link
Contributor

ehuggett commented Aug 17, 2017

I was able to reproduce with the following on dev and stage

  • Firefox 52.3.0 (64-bit) from debian package repositories (on Debian 9)
  • Firefox Developer Edition 56.0b3 (64-bit) from Mozilla (tarball) (also on Debian 9)

Using a file created as follows:
dd if=/dev/urandom of=101kb.txt bs=1024 count=101 did trigger the bug

  • But the progress bar works when I change the file extension to rzr
  • I have not tested files with no extension
  • a 27byte file does not appear to trigger the bug

dannycoates added a commit that referenced this issue Aug 17, 2017
@ehuggett
Copy link
Contributor

Somebody seems to have set the content-type header to something other than octet stream, why? (not yet on production)

@ehuggett
Copy link
Contributor

ehuggett commented Aug 17, 2017

oh dear... this also breaks if you upload an html file, I strongly suspect the Content-Type header is related

That header will be set to "text/html" on the response from https://send.dev.mozaws.net/assets/download/, does this violate "Web APIs must set a non-HTML content-type on all responses, including 300s, 400s and 500s (APP-NOHTML)" from #202? (remember encryption is technically optional as it is performed by the client so could this potentially be used to host html files on send?)

edit: added screenshot
screenshot from 2017-08-17 18-14-53

@dannycoates
Copy link
Contributor

This should be fixed as of e9405f4 and is up on https://send.dev.mozaws.net

The content-type was added to support mobile browsers but only the decrypted blob should have that type. The encrypted download should just be application/octet-stream.

@SoftVision-CiprianMuresan
Copy link
Author

The issue is no longer reproducible on the Dev and Stage pages. Marking as verified.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
[QA]:Verified fixed Label for QA to mark verified fixed issues
Projects
None yet
Development

No branches or pull requests

3 participants