Skip to content

Commit

Permalink
Build with EOS reordering fix
Browse files Browse the repository at this point in the history
  • Loading branch information
linev committed Oct 30, 2024
1 parent 17265d0 commit 3b22f74
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
28 changes: 25 additions & 3 deletions build/jsroot.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const version_id = '7.7.x',

/** @summary version date
* @desc Release date in format day/month/year like '14/04/2022' */
version_date = '28/10/2024',
version_date = '30/10/2024',

/** @summary version id and date
* @desc Produced by concatenation of {@link version_id} and {@link version_date}
Expand Down Expand Up @@ -99272,7 +99272,7 @@ class TFile {
// multipart messages requires special handling

const indx = hdr.indexOf('boundary=');
let boundary = '', n = first, o = 0;
let boundary = '', n = first, o = 0, normal_order = true;
if (indx > 0) {
boundary = hdr.slice(indx + 9);
if ((boundary[0] === '"') && (boundary[boundary.length - 1] === '"'))
Expand Down Expand Up @@ -99326,12 +99326,34 @@ class TFile {
blobs.push(new DataView(res, o, place[n + 1]));
o += place[n + 1];
n += 2;
} else {
} else if (normal_order) {
const n0 = n;
while ((n < last) && (place[n] >= segm_start) && (place[n] + place[n + 1] - 1 <= segm_last)) {
blobs.push(new DataView(res, o + place[n] - segm_start, place[n + 1]));
n += 2;
}

if (n > n0)
o += (segm_last - segm_start + 1);
else
normal_order = false;
}

if (!normal_order) {
// special situation when server reorder segments in the reply
let isany = false;
for (let n1 = n; n1 < last; n1 += 2) {
if ((place[n1] >= segm_start) && (place[n1] + place[n1 + 1] - 1 <= segm_last)) {
blobs[n1/2] = new DataView(res, o + place[n1] - segm_start, place[n1 + 1]);
isany = true;
}
}
if (!isany)
return rejectFunc(Error(`Provided fragment ${segm_start} - ${segm_last} out of requested multi-range request`));

while (blobs[n/2])
n += 2;

o += (segm_last - segm_start + 1);
}
}
Expand Down
1 change: 1 addition & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
3. Fix - do not force style 8 for hist markers
4. Fix - ensure minimal hist title height
5. Fix - disable Bloom effect on Android
6. Fix - handle reordering of fragments in multipart reply #319


## Changes in 7.7.4
Expand Down
2 changes: 1 addition & 1 deletion modules/core.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const version_id = '7.7.x',

/** @summary version date
* @desc Release date in format day/month/year like '14/04/2022' */
version_date = '28/10/2024',
version_date = '30/10/2024',

/** @summary version id and date
* @desc Produced by concatenation of {@link version_id} and {@link version_date}
Expand Down

0 comments on commit 3b22f74

Please sign in to comment.