Skip to content
Myr

fix(`utils/buffer`): don't decode space as `+` (#1411)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* fix(`utils/buffer`): don't decode space as `+` * denoify

authored by Yusuke Wada · committed by GitHub · parent dbd4841 · Browse files · 3 files+8 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+8 added−5 removed

  • tests:+6 added−3 removed
  • other:+2 added−2 removed

3 files+8 added−5 removed

modified:deno_dist/utils/buffer.ts+1 added-1 removed
modified:src/utils/buffer.test.ts+6 added-3 removed
modified:src/utils/buffer.ts+1 added-1 removed
46 unmodified lines
47 }48 return buffer49}5051const _decodeURIComponent = decodeURIComponent51const _decodeURIComponent = (str: string) => decodeURIComponent(str.replace(/\+/g, ' '))5253export const bufferToFormData = (arrayBuffer: ArrayBuffer, contentType: string) => {54 const decoder = new TextDecoder('utf-8')55 const content = decoder.decode(arrayBuffer)
25 unmodified lines