Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Dmitriy (or others looking for a possible solution) if an html page is appearing in your downloaded file, I suspect this is due to the double HttpRequest GET issue. A typical scenario is the following POST, Redirect, GET model:</p> <ul> <li><p>Android browser issues a HttpRequest POST to server (e.g. submit button or link to request a download file, filename.ext say)</p></li> <li><p>Server streams the requested filename.ext to bytes, stores in a session variable, and then issues a Response.Redirect to Download.aspx, for example, to handle the response object construction</p></li> <li><p>Android browser correctly sends HttpRequest GET to server for Download.aspx</p></li> <li><p>Server responds with typical Content-Disposition: attachment; filename="filename.ext" style construct with the response object containing the requested filename.ext, being the bytes in the session variable.</p></li> <li><p>Android download manager, I believe, then sends another HttpRequest GET to server for Download.aspx. I suspect that the download manager interprets the previous "attachment" response as a trigger to send this second GET.</p></li> <li><p>Server (Download.aspx) again tries to construct the response object to send back to the browser.</p></li> <li><p>Android download manager downloads filename.ext, using the response object contents from the second Download.aspx.</p></li> </ul> <p>In many scenarios this would be fine. But if, for example, the server in the Download.aspx code does some housekeeping and removes the session variable the first time it is called, then the next time around there is no session variable. So, depending on how the code is written it is possible that the response object doesn't get explicity constructed and maybe the Response.End doesn't get called and so only the Download.aspx's html ends up being sent.</p> <p>This is what we discovered using Wireshark, although I admit I am assuming it is the Android download manager that is the cause for the double GET.</p> <p>I hope this explanation has been of some help.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload