Skip to content

Commit

Permalink
Fix for ext info usnistgov#20
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimirralev committed Dec 1, 2016
1 parent a61055a commit 3cb6bd5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
* gen-value = token / host / quoted-string
* </pre>
*
* <p>https://tools.ietf.org/html/rfc7913</p>
* <p>RFC 7913 - P-Access-Network-Info ABNF Update </p>
* <p>Newer RFC https://tools.ietf.org/html/rfc7913</p>
* <pre>
* access-info = cgi-3gpp / utran-cell-id-3gpp /
* dsl-location / i-wlan-node-id /
Expand Down Expand Up @@ -128,7 +129,9 @@ public SIPHeader parse() throws ParseException
if(ext == null) {
ext = this.lexer.ttokenGenValue();
} else {
ext = "\"" + ext + "\"";
// avoids tokens such as "a=b" to be stripped of quotes and misinterpretend as
// RFC 7913 generic-param when re-encoded
ext = "\"" + ext + "\"";
}
accessNetworkInfo.setExtensionAccessInfo(ext);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ public void testParser() {
String[] accessNetworkInfo = {

"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE; [123:4::abcd]; rand=l\n",
"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE; a-b.c1; rand=l\n",
"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE; 127.0.0.1; rand=l\n",
"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE;\"\"\n",
"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE;\";\"\n",
"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE;\"ip=123.123.123.123\"\n",
"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE; [123:4::abcd];rand=l\n",
"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE; [123:4::abcd]\n",
Expand Down

0 comments on commit 3cb6bd5

Please sign in to comment.