Close the session for writing when sending a file
Right now, if you download an archive, you won't be able to browse within h5ai until the download is finished. This is because the session data is locked to prevent concurrent writes, which also prevents concurrent requests. By adding session_write_close() in the on_download function, the session lock is released and concurrent requests will work.
This commit is contained in:
parent
ce939c3115
commit
6da08269d8
|
@ -31,6 +31,7 @@ class Api {
|
|||
$archive = new Archive($this->context);
|
||||
|
||||
set_time_limit(0);
|
||||
session_write_close();
|
||||
header('Content-Type: application/octet-stream');
|
||||
header('Content-Disposition: attachment; filename="' . $as . '"');
|
||||
header('Connection: close');
|
||||
|
|
Loading…
Reference in New Issue