<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15177">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved
Sean Bright: Looks good to me, but someone else must approve
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip: set Accept-Encoding to identity in OPTIONS response<br><br>RFC 3261 says that the Accept-Encoding header should be present<br>in an options response. Permitted values according to RFC 2616<br>are only compression algorithms like gzip or the default identity<br>encoding. Therefore "text/plain" is not a correct value here.<br>As long as the header is hard coded, it should be set to "identity".<br><br>Without this fix an Alcatel OmniPCX periodically logs warnings like<br>"[sip_acceptIncorrectHeader] Header Accept-Encoding is malformed"<br>on a SIP Trunk.<br><br>ASTERISK-29165 #close<br><br>Change-Id: I0aa2211ebf0b4c2ed554ac7cda794523803a3840<br>---<br>M res/res_pjsip/pjsip_options.c<br>M res/res_pjsip_dlg_options.c<br>2 files changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip/pjsip_options.c b/res/res_pjsip/pjsip_options.c</span><br><span>index 579165f..e1f048e 100644</span><br><span>--- a/res/res_pjsip/pjsip_options.c</span><br><span>+++ b/res/res_pjsip/pjsip_options.c</span><br><span>@@ -94,7 +94,7 @@</span><br><span> */</span><br><span> </span><br><span> #define DEFAULT_LANGUAGE "en"</span><br><span style="color: hsl(0, 100%, 40%);">-#define DEFAULT_ENCODING "text/plain"</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEFAULT_ENCODING "identity"</span><br><span> </span><br><span> /*! \brief These are the number of buckets to store AORs in */</span><br><span> #ifdef LOW_MEMORY</span><br><span>diff --git a/res/res_pjsip_dlg_options.c b/res/res_pjsip_dlg_options.c</span><br><span>index 5c1da53..d073734 100644</span><br><span>--- a/res/res_pjsip_dlg_options.c</span><br><span>+++ b/res/res_pjsip_dlg_options.c</span><br><span>@@ -34,7 +34,7 @@</span><br><span> #include "asterisk/res_pjsip_session.h"</span><br><span> </span><br><span> #define DEFAULT_LANGUAGE "en"</span><br><span style="color: hsl(0, 100%, 40%);">-#define DEFAULT_ENCODING "text/plain"</span><br><span style="color: hsl(120, 100%, 40%);">+#define DEFAULT_ENCODING "identity"</span><br><span> </span><br><span> static int options_incoming_request(struct ast_sip_session *session, pjsip_rx_data *rdata)</span><br><span> {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15177">change 15177</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/15177"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I0aa2211ebf0b4c2ed554ac7cda794523803a3840 </div>
<div style="display:none"> Gerrit-Change-Number: 15177 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Alexander Greiner-Baer <alex+asterisk@greiner-baer.de> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-CC: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>