@@ -936,13 +936,17 @@
Loading
936 936
	} else if ((strcmp(url->u_scheme, "https") == 0) ||
937 937
	    (strcmp(url->u_scheme, "wss") == 0)) {
938 938
		myurl.u_scheme = "tls+tcp";
939 -
	} else if (strcmp(url->u_scheme, "ws4") == 0) {
939 +
	} else if ((strcmp(url->u_scheme, "ws4") == 0) ||
940 +
	    (strcmp(url->u_scheme, "http4")) == 0) {
940 941
		myurl.u_scheme = "tcp4";
941 -
	} else if (strcmp(url->u_scheme, "ws6") == 0) {
942 +
	} else if ((strcmp(url->u_scheme, "ws6") == 0) ||
943 +
	    (strcmp(url->u_scheme, "http6") == 0)) {
942 944
		myurl.u_scheme = "tcp6";
943 -
	} else if (strcmp(url->u_scheme, "wss4") == 0) {
945 +
	} else if ((strcmp(url->u_scheme, "wss4") == 0) ||
946 +
	    (strcmp(url->u_scheme, "https4") == 0)) {
944 947
		myurl.u_scheme = "tls+tcp4";
945 -
	} else if (strcmp(url->u_scheme, "wss6") == 0) {
948 +
	} else if ((strcmp(url->u_scheme, "wss6") == 0) ||
949 +
	    (strcmp(url->u_scheme, "https6") == 0)) {
946 950
		myurl.u_scheme = "tls+tcp6";
947 951
	} else {
948 952
		return (NNG_EADDRINVAL);

@@ -99,16 +99,28 @@
Loading
99 99
{
100 100
	int              rv;
101 101
	nni_http_client *c;
102 -
	nng_url          myurl;
102 +
	nng_url          my_url;
103 103
104 104
	// Rewrite URLs to either TLS or TCP.
105 -
	memcpy(&myurl, url, sizeof(myurl));
105 +
	memcpy(&my_url, url, sizeof(my_url));
106 106
	if ((strcmp(url->u_scheme, "http") == 0) ||
107 107
	    (strcmp(url->u_scheme, "ws") == 0)) {
108 -
		myurl.u_scheme = "tcp";
108 +
		my_url.u_scheme = "tcp";
109 109
	} else if ((strcmp(url->u_scheme, "https") == 0) ||
110 110
	    (strcmp(url->u_scheme, "wss") == 0)) {
111 -
		myurl.u_scheme = "tls+tcp";
111 +
		my_url.u_scheme = "tls+tcp";
112 +
	} else if ((strcmp(url->u_scheme, "ws4") == 0) ||
113 +
	    (strcmp(url->u_scheme, "http4") == 0)) {
114 +
		my_url.u_scheme = "tcp4";
115 +
	} else if ((strcmp(url->u_scheme, "ws6") == 0) ||
116 +
	    (strcmp(url->u_scheme, "http6") == 0)) {
117 +
		my_url.u_scheme = "tcp6";
118 +
	} else if ((strcmp(url->u_scheme, "wss4") == 0) ||
119 +
	    (strcmp(url->u_scheme, "https4") == 0)) {
120 +
		my_url.u_scheme = "tls+tcp4";
121 +
	} else if ((strcmp(url->u_scheme, "wss6") == 0) ||
122 +
	    (strcmp(url->u_scheme, "https6") == 0)) {
123 +
		my_url.u_scheme = "tls+tcp6";
112 124
	} else {
113 125
		return (NNG_EADDRINVAL);
114 126
	}
@@ -124,7 +136,7 @@
Loading
124 136
	nni_mtx_init(&c->mtx);
125 137
	nni_aio_list_init(&c->aios);
126 138
127 -
	if ((rv = nng_stream_dialer_alloc_url(&c->dialer, &myurl)) != 0) {
139 +
	if ((rv = nng_stream_dialer_alloc_url(&c->dialer, &my_url)) != 0) {
128 140
		nni_http_client_fini(c);
129 141
		return (rv);
130 142
	}
Files Coverage
src 79.99%
tools/nngcat/nngcat.c 58.81%
Project Totals (85 files) 79.33%
1
ignore:
2
 - "tests"
3
 - "perf"
4
 - "**/*_test.c"
5
coverage:
6
 range: 50..95
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading