Ajax: Don't treat array data as binary
commit992a1911d0b6195012edc25fd5a48810d4be64b5
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Mon, 20 Mar 2023 23:36:00 +0000 (21 00:36 +0100)
committerGitHub <noreply@github.com>
Mon, 20 Mar 2023 23:36:00 +0000 (21 00:36 +0100)
treecf98cb1e6b977f97afca217b0f9d72fff8f65a5e
parente77bd9d64fc696cadfe1f8c9ebb50d7609a97b07
Ajax: Don't treat array data as binary

PR gh-5197 started treating all non-string non-plain-object
`data` values as binary. However, `jQuery.ajax` also supports
arrays as values of `data`. This change makes regular arrays
no longer be considered binary data.

Surprisingly, we had no tests for array `data` values; otherwise,
we'd detect the issue earlier. This change also adds
a few such missing tests.

Closes gh-5203
Ref gh-5197
src/ajax/binary.js
test/unit/ajax.js