mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-04 08:55:40 +03:00
do not include authority in request
include scheme only if not default
This commit is contained in:
1 parent
820fca42dd
commit
ec72893af8
1 file changed
+7
-5
+7
-5
@@ -418,16 +418,18 @@ void
|
||||
cmdline_uri(char *arg) {
|
||||
coap_split_uri((unsigned char *)arg, &uri );
|
||||
|
||||
if (uri.scheme.length)
|
||||
if (uri.scheme.length &&
|
||||
(uri.scheme.length != strlen(COAP_DEFAULT_SCHEME)
|
||||
|| memcmp(uri.scheme.s, COAP_DEFAULT_SCHEME, uri.scheme.length)))
|
||||
coap_insert( &optlist, new_option_node(COAP_OPTION_URI_SCHEME,
|
||||
uri.scheme.length, uri.scheme.s),
|
||||
order_opts);
|
||||
|
||||
order_opts);
|
||||
#if 0 /* need authority only for proxy requests */
|
||||
if (uri.na.length)
|
||||
coap_insert( &optlist, new_option_node(COAP_OPTION_URI_AUTHORITY,
|
||||
uri.na.length, uri.na.s),
|
||||
order_opts);
|
||||
|
||||
order_opts);
|
||||
#endif
|
||||
if (uri.path.length)
|
||||
coap_insert( &optlist, new_option_node(COAP_OPTION_URI_PATH,
|
||||
uri.path.length, uri.path.s),
|
||||
|
||||
Reference in new issue
Block a user