diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-02-02 10:57:18 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-02-02 10:57:18 -0800 |
| commit | 490bc97dbf76fae2a99c8bacd5fd9be332d68b90 (patch) | |
| tree | 5504c23957e99ef5290c9048fedc27b1dbc25e77 /tests | |
| parent | 5e5f814d63d4e00365b0ae726bc18831aa28e88f (diff) | |
| download | nng-490bc97dbf76fae2a99c8bacd5fd9be332d68b90.tar.gz nng-490bc97dbf76fae2a99c8bacd5fd9be332d68b90.tar.bz2 nng-490bc97dbf76fae2a99c8bacd5fd9be332d68b90.zip | |
Add, and document, the url->u_requri member.
This member is the value passed in actual HTTP protocol, so it
is useful with the function nng_http_req_set_uri().
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/url.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/url.c b/tests/url.c index a4b4457b..c35feee1 100644 --- a/tests/url.c +++ b/tests/url.c @@ -26,7 +26,7 @@ TestMain("URLs", { So(strcmp(url->u_hostname, "www.google.com") == 0); So(strcmp(url->u_port, "80") == 0); So(strcmp(url->u_path, "") == 0); - So(strcmp(url->u_rawpath, "") == 0); + So(strcmp(url->u_requri, "") == 0); So(url->u_query == NULL); So(url->u_fragment == NULL); So(url->u_userinfo == NULL); @@ -41,7 +41,7 @@ TestMain("URLs", { So(strcmp(url->u_hostname, "www.google.com") == 0); So(strcmp(url->u_port, "1234") == 0); So(strcmp(url->u_path, "") == 0); - So(strcmp(url->u_rawpath, "") == 0); + So(strcmp(url->u_requri, "") == 0); So(url->u_query == NULL); So(url->u_fragment == NULL); So(url->u_userinfo == NULL); @@ -57,7 +57,7 @@ TestMain("URLs", { So(strcmp(url->u_hostname, "www.google.com") == 0); So(strcmp(url->u_port, "1234") == 0); So(strcmp(url->u_path, "/somewhere") == 0); - So(strcmp(url->u_rawpath, "/somewhere") == 0); + So(strcmp(url->u_requri, "/somewhere") == 0); So(url->u_userinfo == NULL); So(url->u_query == NULL); So(url->u_fragment == NULL); @@ -73,7 +73,7 @@ TestMain("URLs", { So(strcmp(url->u_hostname, "www.google.com") == 0); So(strcmp(url->u_port, "1234") == 0); So(strcmp(url->u_path, "/somewhere") == 0); - So(strcmp(url->u_rawpath, "/somewhere") == 0); + So(strcmp(url->u_requri, "/somewhere") == 0); So(url->u_query == NULL); So(url->u_fragment == NULL); nng_url_free(url); @@ -88,7 +88,7 @@ TestMain("URLs", { So(strcmp(url->u_port, "80") == 0); So(strcmp(url->u_path, "/somewhere") == 0); So(strcmp(url->u_query, "result=yes") == 0); - So(strcmp(url->u_rawpath, "/somewhere?result=yes") == 0); + So(strcmp(url->u_requri, "/somewhere?result=yes") == 0); So(url->u_userinfo == NULL); So(url->u_fragment == NULL); nng_url_free(url); @@ -105,7 +105,7 @@ TestMain("URLs", { So(strcmp(url->u_path, "/somewhere") == 0); So(strcmp(url->u_query, "result=yes") == 0); So(strcmp(url->u_fragment, "chapter1") == 0); - So(strcmp(url->u_rawpath, "/somewhere?result=yes#chapter1") == + So(strcmp(url->u_requri, "/somewhere?result=yes#chapter1") == 0); So(url->u_userinfo == NULL); nng_url_free(url); @@ -120,7 +120,7 @@ TestMain("URLs", { So(strcmp(url->u_port, "80") == 0); So(strcmp(url->u_path, "/somewhere") == 0); So(strcmp(url->u_fragment, "chapter2") == 0); - So(strcmp(url->u_rawpath, "/somewhere#chapter2") == 0); + So(strcmp(url->u_requri, "/somewhere#chapter2") == 0); So(url->u_query == NULL); So(url->u_userinfo == NULL); nng_url_free(url); @@ -134,7 +134,7 @@ TestMain("URLs", { So(strcmp(url->u_path, "") == 0); So(strcmp(url->u_port, "80") == 0); So(strcmp(url->u_fragment, "chapter3") == 0); - So(strcmp(url->u_rawpath, "#chapter3") == 0); + So(strcmp(url->u_requri, "#chapter3") == 0); So(url->u_query == NULL); So(url->u_userinfo == NULL); nng_url_free(url); @@ -149,7 +149,7 @@ TestMain("URLs", { So(strcmp(url->u_path, "") == 0); So(strcmp(url->u_port, "80") == 0); So(strcmp(url->u_query, "color=red") == 0); - So(strcmp(url->u_rawpath, "?color=red") == 0); + So(strcmp(url->u_requri, "?color=red") == 0); So(url->u_fragment == NULL); So(url->u_userinfo == NULL); nng_url_free(url); |
