#10753·remix

\r\n characters are messed up by some CDN providers/build tools

Author: nextendCreated Sep 17, 2025Updated Sep 17, 2026

@mjackson+multipart-parser+0.10.1.patch

We use multipart-parser in a browser script. The problem is with the \r\n characters might get replaced to \n by minify scripts or CDN provider optimizations. I suggest to replace those with:

var CRLF = String.fromCharCode.apply(null,new Uint8Array([13,10]))

and use CRLF variable everywhere.

CDN provider who makes wrong minify:

  • Bunny CDN

Other codes which did not work:

  • String.fromCharCode(13, 10) -> ESbuild converts to \r\n
  • "\x0D\x0A" -> ESbuild converts to \r\n