There is a desktop browser called '360 secure browser'. They have a fairly large share of the market in China, and we are required to support them.
It says the layout engine is Trident (IE), which is what I expected, but I can't verify that right now (on a mac!).
The reason for this is that I have some forms that kick off a download, streaming bytes to the client, and they work in the other major browsers. The code that causes the issue is below, or similar. Is this doing something wrong that I don't notice? The byte streams are usually on the order of 50-100KB, and we haven't had issues with it yet.
- This code is called in response to a PostBack event (eg, button click in a grid, etc)
- This function is called with bytestreams from files, generated in memory, or read from db.
The function:
public static bool DownloadStream(byte[] packageStream, string fileName) {
var response = HttpContext.Current.Response;
response.Clear();
response.AddHeader("Accept-Ranges", "bytes");
response.AddHeader("Content-Disposition", "inline; filename=" + HttpUtility.UrlEncode(fileName, Encoding.UTF8));
response.AddHeader("Content-Length", packageStream.Length.ToString());
response.ContentType = "application/xlsx";
response.BinaryWrite(packageStream);
response.Flush();
HttpContext.Current.ApplicationInstance.CompleteRequest();
return true;
}
Does anyone have any experience supporting this browser? I can't find any information on it when searching in english on google. No specs, no docs, nothing. I have to go to Baidu to find info, and I can't read that level of chinese!
EDIT:
The issue is with the downloader that 360 uses, apparently. I would like to know if there is something that should be changed in the streaming code, though. A header that I am missing, or something else.
- This is only happening for small files. Same page, bigger download = no issues.
- Changing to the built-in IE downloader causes the issue to go away.