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

Multiple headers with the same key return a comma-separated string #43

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

diego-asterisk
Copy link

This commit fixes issue #42 support multiple headers


client_messages.should be == [
[Stream::Connected.new, @stream],
[Event.new('Status', 'Channel' => 'SIP/101-3f3f', 'Variable' => 'CDR(ds_type)=Test-INT,from_user=ssether,companyID=Test', 'ActionID' => '2'), @stream],
Copy link
Member

Choose a reason for hiding this comment

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

What about this?

Suggested change
[Event.new('Status', 'Channel' => 'SIP/101-3f3f', 'Variable' => 'CDR(ds_type)=Test-INT,from_user=ssether,companyID=Test', 'ActionID' => '2'), @stream],
[Event.new('Status', 'Channel' => 'SIP/101-3f3f', 'Variable' => ['CDR(ds_type)=Test-INT', 'from_user=ssether', 'companyID=Test'], 'ActionID' => '2'), @stream],

Copy link
Author

Choose a reason for hiding this comment

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

I'd rather a 'string' to not change the interface, but it could return a 'map' with key / values

Copy link
Member

Choose a reason for hiding this comment

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

The problem with a Hash is that it is specific to the Variable header, and not a generic way of expressing multiple values for any header.

@benlangfeld
Copy link
Member

@lpradovera Would you mind shepherding this through?

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.

None yet

2 participants