Skip to content

Fix parsing headers: short and long version of "Via"#309

Open
denisolyanyuk wants to merge 1 commit into
tayler6000:developmentfrom
denisolyanyuk:development
Open

Fix parsing headers: short and long version of "Via"#309
denisolyanyuk wants to merge 1 commit into
tayler6000:developmentfrom
denisolyanyuk:development

Conversation

@denisolyanyuk
Copy link
Copy Markdown

When I was trying to work with 8x8 provider, I was getting 400 Malformed Request

I Found out that it's because short version of header "Via" - even if we get "v" to headers we adding "Via".

Here is small fix

Comment on lines +30 to +33
if key == "Via" or key == "v":
headers[key].append(value)
if key not in headers.keys():
headers[key] = value
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
if key == "Via" or key == "v":
headers[key].append(value)
if key not in headers.keys():
headers[key] = value
if key in headers:
headers[key].append(value)
else:
headers[key] = value

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.

3 participants