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

extra headers in rtjson #902

Closed
lazedo opened this issue Dec 24, 2016 · 2 comments
Closed

extra headers in rtjson #902

lazedo opened this issue Dec 24, 2016 · 2 comments

Comments

@lazedo
Copy link
Contributor

lazedo commented Dec 24, 2016

Hi,
encoding \r\n in json is not desirable.
i propose we change the format of "extra" headers in rtjson from
"extra": "X-Hdr-A: abc\r\nX-Hdr-B: bcd\r\n"
to
"extra": {"X-Hdr-A" : "abc" , "X-Hdr-B" : "bcd"}

@miconda
Copy link
Member

miconda commented Jan 2, 2017

Overall I am fine with updating to this format (or even support both, old single value and new array), but there are some bits to clarify or sort out:

  • what is the problem with '\r\n' in a json value? A SIP header body can have '\r\n', if the next line starts with whitespace or tab. Also, there are some jsonrpc commands that expect a SIP body, where there are end of lines
  • how is going to work if one wants to add more than one header with the same name? Is json supporting multiple fields with same name in a struct?

@lazedo
Copy link
Contributor Author

lazedo commented Jan 3, 2017

@miconda i think i jumped too fast into this. your comments make absolute sense. sorry for taking your time.

@lazedo lazedo closed this as completed Jan 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants