Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow header instances in message delivery methods #281

Merged
merged 1 commit into from
Aug 6, 2024
Merged

Conversation

gsteel
Copy link
Owner

@gsteel gsteel commented Aug 6, 2024

If you had multiple headers with the same name and different values, it was impossible to provide them as a one dimensional hash.

This patch changes Header::listFromArray() so that it will accept instances of Header rather than assuming the argument is a map. The side effect is that users can supply a list of Header instances, thereby enabling multiple headers with the same name.

Additionally, this patch rejects array members with an empty string. Previously, an assertion error would have been thrown in dev, but silently and erroneously passed to the server in prod.

@gsteel gsteel added bug Something isn't working enhancement New feature or request labels Aug 6, 2024
@gsteel gsteel added this to the 5.3.0 milestone Aug 6, 2024
@gsteel gsteel self-assigned this Aug 6, 2024
If you had multiple headers with the same name and different values, it was impossible to provide them as a one dimensional hash.

This patch changes `Header::listFromArray()` so that it will accept instances of `Header` rather than assuming the argument is a map. The side effect is that users can supply a list of `Header` instances, thereby enabling multiple headers with the same name.

Additionally, this patch rejects array members with an empty string. Previously, an assertion error would have been thrown in dev, but silently and erroneously passed to the server in prod.
@gsteel gsteel merged commit e276e8b into 5.3.x Aug 6, 2024
15 checks passed
@gsteel gsteel deleted the header-argument branch August 6, 2024 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant