title: Does Safari on iOS refuse to download `application/octet-stream` content?
body: <p>I have a Web server written on top of your standard <code>http</code> module in Node.js. It's been working like a clock for me for serving all kinds of HTML, JavaScript, CSS, and asset content -- making up the bulk of my web pages, naturally. </p>
  
  <p>When the service is requested a URL that maps to a file with an unknown extension (there is no MIME sniffing going on), it simply serves content using chunked transfer encoding with the header <code>Content-Type: application/octet-stream</code>, which has been working wonderfully as well -- I occasionally host files of all kinds on the server and am able to download these without any interference from the user agent, as I'd expect from <code>application/octet-stream</code> handling.</p>
  
  <p>Today, however, I tried to download on a Safari mobile browser running on iOS 9.3.5 on an iPhone 4S, and that thing just plain refused to download from a valid URL, alerting me with:</p>
  
  <blockquote>
    <p>Download failed. Safari cannot download this file.</p>
  </blockquote>
  
  <p>I've since tried to add <code>Content-Disposition: attachment</code> and also <code>Content-Disposition: attachment; filename="foobar"</code> for good measure, but it still refuses.</p>
  
  <p>This has been the case with a file called <code>random</code> which is filled with 1000 random bytes. My host headers are (<code>Content-Disposition</code> is optional, as said above):</p>
  
  <pre><code>HTTP/1.1 200 OK
  Host: example.com
  Content-Type: application/octet-stream
  Content-Disposition: attachment; filename="foobar"
  Date: Mon, 01 May 2017 13:48:37 GMT
  Connection: keep-alive
  Transfer-Encoding: chunked
  </code></pre>
  
  <p>For the record, Android 6.x phone also behaves as expected (in addition to Firefox 53 on my Windows 10 x86_64 host), downloading from the URL without a hitch.</p>
  
  <p>What's going on with Safari here?</p>