Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Fixing multi value headers so they are serialized correctly #20

Merged
merged 4 commits into from
Nov 8, 2022

Conversation

AlexV525
Copy link
Member

@AlexV525 AlexV525 commented Nov 8, 2022

Picked from cfug/dio#1586

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 develop to avoid conflicts (via merge from master or rebase)
  • I have added the required tests to prove the fix/feature I am adding
  • I have updated the documentation (if necessary)
  • I have run the tests and they pass

This merge request fixes / refers to the following issues: There was a change in version 4.0.1 that converted request header to their string values. This breaks multi value request headers as the get serialized like this [value1,value2] instead of like this value1,value2

Pull Request Description

Change has been made to use the previous code, which worked in 4.0.0. This bug was found after upgrading from 4.0.0 to 4.0.6

@AlexV525 AlexV525 merged commit 9f4e29d into main Nov 8, 2022
@AlexV525 AlexV525 deleted the fix-multi-values-headers branch November 8, 2022 13:29
@ueman
Copy link
Contributor

ueman commented Nov 8, 2022

Not really related to this PR, but I just noticed that the Response has a List<Headers> whereas the you add header to the options as a Map<String, dynamic>. It would make a lot of sense to unify that, since it would make verification of headers unified for requests and responses. It would probably also make testing easier.

@AlexV525
Copy link
Member Author

AlexV525 commented Nov 9, 2022

Not really related to this PR, but I just noticed that the Response has a List<Headers> whereas the you add header to the options as a Map<String, dynamic>.

I only found Headers in the Response, can you indicate that?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants