fix(glpi): accept HTTP 206 in list wrappers (#807) #810
Reference in New Issue
Block a user
Delete Branch "fix/807-glpi-206"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Root cause
The three GLPI list wrappers issue ranged requests (
?range=0-N) but accepted only HTTP 200. Healthy GLPI ranged responses use HTTP 206 Partial Content, so ticket, computer, and user listing all exited with an error against a working server.Fix
ticket-list.sh,computer-list.sh, anduser-list.sh.session-init.shandticket-create.shunchanged.Red-first evidence
Before the source fix,
packages/mosaic/framework/tools/glpi/test-list-http-status.shexited 1: all three HTTP 206 render assertions failed, while all three HTTP 401 failure assertions passed.After the fix, the same test passes all six assertions.
Verification
packages/mosaic/framework/tools/glpi/test-list-http-status.shbash -n packages/mosaic/framework/tools/glpi/{ticket-list.sh,computer-list.sh,user-list.sh,test-list-http-status.sh}shellcheck packages/mosaic/framework/tools/glpi/test-list-http-status.shpnpm typecheck(42/42)pnpm lint(23/23)pnpm format:checkCloses #807