Download links do not force downloading

Bug #920651 reported by Aaron Bentley
4
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

I am trying to download the pyOpenSSL-0.11-py3.2-win32.egg at https://launchpad.net/pyopenssl - when I click on "download" this gives me a page of garbage text...shouldn't I be getting a file downloaded?

Aaron Bentley (abentley)
Changed in launchpad:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Aaron Bentley (abentley) wrote :

The librarian should be sending the correct MIME type, but we should also provide a Content-Disposition header, to encourage the browser to download, rather than display, the page.

$ wget -S http://launchpad.net/pyopenssl/main/0.11/+download/pyOpenSSL-0.11-py3.2-win32.egg
--2012-01-23 15:57:51-- http://launchpad.net/pyopenssl/main/0.11/+download/pyOpenSSL-0.11-py3.2-win32.egg
Resolving launchpad.net... 91.189.89.222, 91.189.89.223
Connecting to launchpad.net|91.189.89.222|:80... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 303 See Other
  Date: Mon, 23 Jan 2012 20:57:51 GMT
  Server: zope.server.http (HTTP)
  X-Powered-By: Zope (www.zope.org), Python (www.python.org)
  X-Content-Type-Warning: guessed from content
  Content-Length: 0
  Location: http://launchpadlibrarian.net/58498845/pyOpenSSL-0.11-py3.2-win32.egg
  Vary: Cookie,Authorization,Accept-Encoding
  Content-Type: text/plain;charset=utf-8
  Via: 1.0 launchpad.net
  Keep-Alive: timeout=15, max=100
  Connection: Keep-Alive
Location: http://launchpadlibrarian.net/58498845/pyOpenSSL-0.11-py3.2-win32.egg [following]
--2012-01-23 15:57:52-- http://launchpadlibrarian.net/58498845/pyOpenSSL-0.11-py3.2-win32.egg
Resolving launchpadlibrarian.net... 91.189.89.228, 91.189.89.229
Connecting to launchpadlibrarian.net|91.189.89.228|:80... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Date: Mon, 23 Jan 2012 20:23:14 GMT
  Server: TwistedWeb/11.1.0
  Content-Length: 773266
  Accept-Ranges: bytes
  Last-Modified: Mon, 01 Nov 2010 22:33:14 GMT
  Cache-Control: max-age=31536000, public
  Content-Type: text/plain
  Age: 2078
  X-Cache: HIT from banana.canonical.com
  X-Cache-Lookup: HIT from banana.canonical.com:3128
  Via: 1.0 banana.canonical.com:3128 (squid/2.7.STABLE7)
  Via: 1.0 launchpadlibrarian.net
  Vary: Accept-Encoding
  Keep-Alive: timeout=15, max=100
  Connection: Keep-Alive
Length: 773266 (755K) [text/plain]
Saving to: `pyOpenSSL-0.11-py3.2-win32.egg'

100%[======================================>] 773,266 237K/s in 3.2s

2012-01-23 15:57:55 (237 KB/s) - `pyOpenSSL-0.11-py3.2-win32.egg' saved [773266/773266]

Curtis Hovey (sinzui)
tags: added: releases
tags: added: librarian
Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 920651] Re: Download links do not force downloading

Adding C-D for text types would be really really annoying for many
users of the librarian. Build logs for example are very conveniently
shown in the browser.

Fixing the MIME type is all that is needed here.

-Rob

Revision history for this message
Aaron Bentley (abentley) wrote :

Adding C-D for files that are indicated to be installers need not imply adding it for text types. Fixing the MIME type would be good, but adding C-D provides a stronger guarantee that the user's browser will handle the file appropriately.

Revision history for this message
Robert Collins (lifeless) wrote :

On Thu, Jan 26, 2012 at 10:40 AM, Aaron Bentley <email address hidden> wrote:
> Adding C-D for files that are indicated to be installers need not imply
> adding it for text types.  Fixing the MIME type would be good, but
> adding C-D provides a stronger guarantee that the user's browser will
> handle the file appropriately.

Good point; yes, if we change the contract so that the add-release
code can explicitly say 'this is for download only' would be useful.

Revision history for this message
Aaron Bentley (abentley) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12-01-25 04:57 PM, Robert Collins wrote:
> Good point; yes, if we change the contract so that the add-release
> code can explicitly say 'this is for download only' would be
> useful.

Do you mean that indicating that a file is an installer still isn't a
strong indication that a file is for download only?

Aaron

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8gfb8ACgkQ0F+nu1YWqI0BOwCdFIXaKKObRaJs+BPPgfi6mKfB
VgsAn1Stvys6oSKtC8XE6lK21zLbi91d
=hnnj
-----END PGP SIGNATURE-----

Revision history for this message
Robert Collins (lifeless) wrote :

On Thu, Jan 26, 2012 at 11:10 AM, Aaron Bentley <email address hidden> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 12-01-25 04:57 PM, Robert Collins wrote:
>> Good point; yes, if we change the contract so that the add-release
>> code can explicitly say 'this is for download only' would be
>> useful.
>
> Do you mean that indicating that a file is an installer still isn't a
> strong indication that a file is for download only?

No, I mean that the current internal contract with the librarian does
not carry that information. (Neither the intent of the file, nor
whether a file is for download only or not).

-Rob

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.