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

Allow to send REGISTER request without expires #794

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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