🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@mgol
Copy link
Member

@mgol mgol commented Feb 6, 2023

Summary

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.

Ref gh-5197

Checklist

  • New tests have been added to show the fix or feature works
  • Grunt build and unit tests pass locally with these changes
  • If needed, a docs issue/PR was created at https://github.com/jquery/api.jquery.com

@mgol mgol added this to the 4.0.0 milestone Feb 6, 2023
@mgol mgol self-assigned this Feb 6, 2023
@mgol mgol added Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. and removed Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. labels Feb 7, 2023
@mgol mgol added the Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. label Mar 15, 2023
@timmywil timmywil removed the Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. label Mar 20, 2023
PR jquerygh-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.

Ref jquerygh-5197
@mgol mgol force-pushed the ajax-data-array-no-binary branch from 517a1e1 to c6077e5 Compare March 20, 2023 16:30
@timmywil
Copy link
Member

Please add these same tests to 3.x

@mgol mgol merged commit 992a191 into jquery:main Mar 20, 2023
@mgol mgol deleted the ajax-data-array-no-binary branch March 20, 2023 23:36
@mgol mgol removed the Needs review label Mar 20, 2023
mgol added a commit that referenced this pull request Mar 20, 2023
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 didn't land on `3.x-stable`;
however... Surprisingly, we had no tests for array `data` values.
This change backports a few such missing tests added in gh-5203.

Ref gh-5197
Ref gh-5203
@mgol
Copy link
Member Author

mgol commented Mar 20, 2023

Landed on main in 992a191. Tests cherry-picked to 3.x-stable in 4837a95.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Development

Successfully merging this pull request may close these issues.

2 participants