提交 df8b8627 authored 作者: Michael Jerris's avatar Michael Jerris

allow unescaped # in username portion of uri even though it is agains rfc 2396,…

allow unescaped # in username portion of uri even though it is agains rfc 2396, to be more compatible with broken ua's as there are many who do not properly escape a # in the uri

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3898 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 f79ade45
......@@ -592,9 +592,14 @@ int _url_d(url_t *url, char *s)
if (url->url_type == url_sip || url->url_type == url_sips) {
/* SIP URL may have /; in user part */
n = strcspn(s, "@#"); /* Opaque part */
if (s[n] != '@')
n = 0;
n = strcspn(s, "@"); /* Opaque part */
if (n == strlen(s)) {
if ((strchr(s, '#')))
n = 0;
} else {
if (strchr(s + n, '#'))
n = 0;
}
n += strcspn(s + n, "/;?#");
}
else if (url->url_type == url_wv) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论