diff options
author | Benny Prijono <bennylp@teluu.com> | 2010-10-01 06:43:17 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2010-10-01 06:43:17 +0000 |
commit | 2d607c9fcd1a5ca1c6920d7ce7748cae497ad77f (patch) | |
tree | 0fdeb643344d95f40bb8b6109838fc30a7116c30 /pjlib-util/src/pjlib-util-test | |
parent | 8222a3a22a61dfbd1c443d662f0ec6d7c159b0fd (diff) |
Re #1136 (Basic and digest authentication in the HTTP client): fixed error in parsing URL if the path contains at ("@") character
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3332 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib-util/src/pjlib-util-test')
-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; |