Skip to content

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

@nextend

Description

@nextend

@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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions