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

Prevent setting nil headers #109

Merged
merged 2 commits into from
Feb 23, 2024

Conversation

peterfication
Copy link
Contributor

If the header lambda returns nil, the header is still set with a value of null.

This PR changes that and does not set headers that resolve to nil.

If the header lambda returns `nil`, the header is still set with a value
of `null`.

This PR changes that and does not set headers that resolve to `nil`.
@peterfication
Copy link
Contributor Author

@rmosolgo is this PR something you would consider useful? I need it in the project I'm currently working on.

@rmosolgo
Copy link
Owner

Hey, thanks for this improvement! Sorry it took me so long to review it.

I switched the check from present? to !...nil? in case people want to send blank strings as header values.

@rmosolgo rmosolgo added this to the 1.10.0 milestone Feb 23, 2024
@rmosolgo rmosolgo merged commit 5066dfc into rmosolgo:master Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants