Skip to content

[dio] Fix FormData encoding regression for maps with dynamic keys#1757

Merged
AlexV525 merged 7 commits intocfug:mainfrom
kuhnroyal:bugfix/1741-formdata
Mar 27, 2023
Merged

[dio] Fix FormData encoding regression for maps with dynamic keys#1757
AlexV525 merged 7 commits intocfug:mainfrom
kuhnroyal:bugfix/1741-formdata

Conversation

@kuhnroyal
Copy link
Copy Markdown
Member

@kuhnroyal kuhnroyal commented Mar 22, 2023

In relation to #1741

New Pull Request Checklist

  • I have read the Documentation
  • I have searched for a similar pull request in the project and found none
  • I have updated this branch with the latest main branch to avoid conflicts (via merge from master or rebase)
  • I have added the required tests to prove the fix/feature I'm adding
  • I have updated the documentation (if necessary)
  • I have run the tests without failures
  • I have updated the CHANGELOG.md in the corresponding package

Additional context and info (if any)

Fixes #1741
Fixes #1758

@kuhnroyal kuhnroyal added the b: regression Worked before but not now label Mar 26, 2023
@kuhnroyal kuhnroyal changed the title More tests for formdata encoding Fix FormData encoding regression for maps with dynamic keys Mar 26, 2023
@kuhnroyal kuhnroyal force-pushed the bugfix/1741-formdata branch from 7bf1ce4 to 42ad929 Compare March 26, 2023 22:20
@kuhnroyal
Copy link
Copy Markdown
Member Author

@AlexV525 Please take a look, we should release this asap.

Comment thread dio/test/utils.dart Outdated
/// The URL for the current server instance.
Uri get serverUrl => Uri.parse('http://localhost:${_server?.port}');

final isWeb = identical(1, 1.0);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using this might be more accurate.

const _kIsWeb = bool.hasEnvironment('dart.library.js_util')
? bool.fromEnvironment('dart.library.js_util')
: identical(0, 0.0);

@AlexV525 AlexV525 changed the title Fix FormData encoding regression for maps with dynamic keys [dio] Fix FormData encoding regression for maps with dynamic keys Mar 27, 2023
Comment thread dio/test/utils.dart Outdated
@AlexV525 AlexV525 merged commit d4442a2 into cfug:main Mar 27, 2023
@kuhnroyal kuhnroyal deleted the bugfix/1741-formdata branch March 28, 2023 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

b: regression Worked before but not now

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The result that FormData.fromMap builded on 5.0.3 is different from 3.0.6. FormData.fromMap is encoding request body automatically

2 participants