![]() ![]() This has been the case with a file called random which is filled with 1000 random bytes. ![]() I've since tried to add Content-Disposition: attachment and also Content-Disposition: attachment filename="foobar" for good measure, but it still refuses. 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:Äownload failed. 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 Content-Type: application/octet-stream, 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 application/octet-stream handling. 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. I have a Web server written on top of your standard http module in Node.js. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |