Open talmakion opened 3 years ago
*Need testing
Is testing something I can assist with, or are you waiting for info from me?
Yes, you can write a test case to make sure this event will be correctly parsed. refer to https://github.com/EvoluxBR/greenswitch/blob/8a457a7b10d2b28fc5bc8a9d245ae7ca4816b6a7/tests/test_lib_esl.py#L143
Does this look better?
While ESLEvent works fine with normal events, it is possible to receive log events with no channel UUID, leaving the User-Data header blank. They look like:
The User-Data line is
'User-Data: \n'
, including a space. Both the newline and space are stripped, and you end up with this (pretty-printed header dict) where User-Data is considered a continuation of the previous header:Removing the whitespace strip from ESLEvent.parse_data() doesn't seem to have any adverse affects on other events and fixes this issue: