[pmwiki-users] Multiple simulaneous downloads blocking, using PmWiki per page uploads, and auth
Petko Yotov
5ko at 5ko.fr
Wed Oct 21 08:11:33 PDT 2026
Thanks, this is reasonable, will add it (before the 404 block) for the
next version.
The ramifications are that the session file is unlocked/freed after
authentication but before the streaming, so a parallel download will not
have to wait for the current download to end.
Petko
On 19/10/2026 20:57, Christopher Cox wrote:
> I noticed that multiple videos on a page, even across tabs in a browser
> would cause a type of blocking behavior.
>
> So, me being me (that is, not knowing too much)... I made the following
> change to upload.php (just first part of file function ServeDownload
> shown:
>
> function ServeDownload($filepath, $upname = null) {
> global $UploadExts, $DownloadDisposition, $EnableIMSCaching,
> $EnableDownloadRanges;
> SDV($DownloadDisposition, "inline");
>
> if (is_null($upname)) $upname = preg_replace('!^.*/!', '',
> $filepath);
>
> if (!$upname || !file_exists($filepath)) {
> header("HTTP/1.0 404 Not Found");
> Abort("?requested file not found");
> exit();
> }
>
> // ccox mod
> session_write_close();
> ....
>
> And, that seemed to fix it. Not sure of the ramifications though.
More information about the pmwiki-users
mailing list