Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
    npro  
 Modern all-safe Rust Network Protocol library supporting h1, h2, h3, ws, wt sans-IO and with socket IO + tls
git clone https://npro.rs/repo/npro
 
root / src / server / s-central.c
Author[]Andy Green <andy@warmcat.com> 2026-04-19 19:31 UTC
Committer[]Andy Green <andy@warmcat.com> 2026-04-19 19:31 UTC
Treeb003be1008d279f92b58533780d8cd9c5677a49e   Raw Patch
 
pty: realign CRs handled as CRLFs
pty: realign CRs handled as CRLFs
diff --git a/assets/sai.js b/assets/sai.js index a7c9a8d..9b82cb0 100644 --- a/assets/sai.js +++ b/assets/sai.js @@ -2578,6 +2578,13 @@ function ws_open_sai() if (!tfirst) tfirst = jso.timestamp; last_log_timestamp = jso.timestamp; + /* normalize CRs to LFs so line number counts track them properly */ + if (window._sai_cr_pending && s1.startsWith('\n')) { + s1 = s1.substring(1); + } + window._sai_cr_pending = s1.endsWith('\r'); + s1 = s1.replace(/\r\n/g, '\n').replace(/\r/g, '\n'); + var lines_started = 0; var lines_arr = s1.split('\n'); for (var idx = 0; idx < lines_arr.length; ++idx) {
Page fetched 0s ago, creation time: 2ms (vhost etag hits: 0%, cache hits: 0%)