Limit number of entries in the TTree draw in JSROOT

Hi Dominik,

If you have such server running, send me output of command:

curl -ik -L http://127.0.0.1/flask_test/static/file.root -H "Range: bytes=0-15,1000-1015" --output - 

JSROOT does not print much debug output at this place, but content-type in response header must include multipart string. It is starting point in the modules/io.mjs code around line 3045.

Regards,
Sergey

Hi Sergey,

the result of the above curl command is the following:

HTTP/1.1 416 REQUESTED RANGE NOT SATISFIABLE
Date: Tue, 15 Apr 2025 20:13:28 GMT
Server: Apache/2.4.58 (Ubuntu)
Content-Range: bytes */1135099764
Content-Length: 177
Content-Type: text/html; charset=utf-8

<!doctype html>
<html lang=en>
<title>416 Requested Range Not Satisfiable</title>
<h1>Requested Range Not Satisfiable</h1>
<p>The server cannot provide the requested range.</p>

When I use /files route as in the last version of the send_file_partial function I am able to get rid of 416 error but the request is still single:

HTTP/1.1 206 PARTIAL CONTENT
Date: Tue, 15 Apr 2025 20:16:17 GMT
Server: Apache/2.4.58 (Ubuntu)
Content-Range: bytes 0-15/1135099764
Content-Length: 16
Accept-Ranges: bytes
Content-Type: application/octet-stream

root�\dC�?t

Best,
Dominik

I hope, you can see now the problem.
Server has to support multipart requests - otherwise it will take too long time with single requests.