Skip to content

Conversation

@kkozlik
Copy link
Contributor

@kkozlik kkozlik commented Nov 30, 2022

This PR adding ability to send REGISTERs without expires value and let the server side decide what the expires is.

This is done by setting register_expires to zero in UA config.

Comment on lines +109 to +111
if (this._expires) contactValue = `${this._contact};expires=${this._expires}${this._extraContactParams}`;
extraHeaders.push(`Contact: ${contactValue}`);
if (this._expires) extraHeaders.push(`Expires: ${this._expires}`);
Copy link
Member

Choose a reason for hiding this comment

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

For readability:

Suggested change
if (this._expires) contactValue = `${this._contact};expires=${this._expires}${this._extraContactParams}`;
extraHeaders.push(`Contact: ${contactValue}`);
if (this._expires) extraHeaders.push(`Expires: ${this._expires}`);
let contactValue;
if (this._expires)
{
contactValue = `${this._contact};expires=${this._expires}${this._extraContactParams}`;
extraHeaders.push(`Expires: ${this._expires}`);
}
else
{
contactValue = `${this._contact}${this._extraContactParams}`;
}
extraHeaders.push(`Contact: ${contactValue}`);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants