under normal conditions if a download is interrupted the server sends the client a response with Not served: 503 - Overload, this is what should be reproduced instead of performing a sudden disconnection, perhaps a special section with a macro add header...
Some unexpected results:
Attempts to send those types of headers goes to Status=thinking, unresponsive console ui, stuck.
Problem: header does not reach client
Exception: sending a header that hfs and client don't recognize, reaches the client (but a meaningful header does not)
P.S. For preventing the "corrupt file generator" effect, (right-click+save-as with download limit set), it looks like the redirect macro is a working solution, because it changes the saved filename to section name with .htm extension (a proper file albeit not the one you clicked). This could provide better opportunity for downloading the correct file (instead of a corrupt file). Also new custom section name can be a message [server is busy], which would then look like user tried to download "server is busy.htm". Very clanky, but workable.
...creating variables {.set | # var1.} in the sections of the template to reuse them in the event as {. ^ var1.}
For the error redirect macro, I need to set global-variable to %encoded-folder% (or url) Before to redirection to [server is busy]. I need it to remember the original location.
is this correct?
{.set|%encoded-folder%|#frompath.} Upon arrival at [server is busy] I need to copy the global variable to temporary/local variable (no#) instantly (so that other user probably doesn't change it). What is the macro to copy #frompath to frompath variable?
For that, should I use %encoded-folder% or %item-url% ?
At [server is busy] I intend to display a nice message and redirect-after-seconds to frompath variable so that the user is not on an island.