diff options
Diffstat (limited to 'pjlib-util/src/pjlib-util-test/http_client.c')
-rw-r--r-- | pjlib-util/src/pjlib-util-test/http_client.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pjlib-util/src/pjlib-util-test/http_client.c b/pjlib-util/src/pjlib-util-test/http_client.c index d8445092..9194f2bb 100644 --- a/pjlib-util/src/pjlib-util-test/http_client.c +++ b/pjlib-util/src/pjlib-util-test/http_client.c @@ -303,6 +303,15 @@ static int parse_url_test() /* empty username and passwd*/ {"http://:@pjsip.org", PJ_SUCCESS, "", "", "pjsip.org", 80, "/"}, + /* '@' character in username and path */ + {"http://user@pjsip.org/@", PJ_SUCCESS, "user", "", "pjsip.org", 80, "/@"}, + + /* '@' character in path */ + {"http://pjsip.org/@", PJ_SUCCESS, "", "", "pjsip.org", 80, "/@"}, + + /* '@' character in path */ + {"http://pjsip.org/one@", PJ_SUCCESS, "", "", "pjsip.org", 80, "/one@"}, + /* Invalid URL */ {"http://:", PJ_EINVAL, "", "", "", 0, ""}, @@ -325,6 +334,9 @@ static int parse_url_test() {"http://@/", PJ_EINVAL, "", "", "", 0, ""}, /* Invalid URL */ + {"http:///@", PJ_EINVAL, "", "", "", 0, ""}, + + /* Invalid URL */ {"http://:::", PJ_EINVAL, "", "", "", 0, ""}, }; unsigned i; |