Marcin Trofimiuk
Marcin Trofimiuk

Reputation: 53

GAE Blobstore issue - download fails in internet explorer 8

I have an issue with serving files to internet explorer using send_blob function. Files are quite small from 0.5Mb to 5Mb. All works fine in Firefox and Chrome, but in IE 8.0 I get download progress window and after couple of seconds error:

"Unable to download [blob key here] from [domain name here]

Unable to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later"

Upvotes: 0

Views: 326

Answers (1)

Victor M. Alvarez
Victor M. Alvarez

Reputation: 396

This issue is caused by a bug in IE when trying to download binary files over HTTPS. The bug is related to the Cache-Control header in the HTTP response.

Here you can find more information:

http://support.microsoft.com/kb/323308

http://trac.edgewall.org/ticket/9584

The problem can be solved simply by using HTTP instead of HTTPS or by setting the Cache-Control in your handler to something different than 'no-cache'. The following code worked for me:

class Download(blobstore_handlers.BlobstoreDownloadHandler):   

  def get(self):

    blob = self.request.get('blob_key')
    self.response.headers['Cache-control'] = 'max-age=0'
    self.send_blob(blob)

Upvotes: 2

Related Questions