[IOT-1513] Incorrect URI construction
authorDave Thaler <dthaler@microsoft.com>
Sat, 12 Nov 2016 08:57:16 +0000 (17:57 +0900)
committerAshok Babu Channa <ashok.channa@samsung.com>
Thu, 17 Nov 2016 05:54:54 +0000 (05:54 +0000)
commit38dc195402aa4c8d8792d29d84b1889918d9a570
treed8301572db21b4757b1f387c702cb691714d939b
parentaf6e4e092adc640f5537a14f2012412a47367e39
[IOT-1513] Incorrect URI construction

The % character is not legal to be placed literally in a URI, it must be
escaped (as "%25") before being enclosed in a URI.  Other places were
changed in July in change 9419, and some more in change 14009, but these
code paths were not changed at that time.

This also fixes a bug in setHost which did not mark an IPv6 address as
IPv6, and adds a test case that covers this.

Change-Id: I1331ecb9c5482a2d43dd675978a1f34c6d37cb4c
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14273
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
12 files changed:
resource/csdk/octbstack_product.def
resource/csdk/octbstack_test.def
resource/csdk/security/provisioning/src/pmutility.c
resource/csdk/security/provisioning/src/secureresourceprovider.c
resource/csdk/security/src/directpairing.c
resource/csdk/stack/include/internal/ocstackinternal.h
resource/csdk/stack/include/ocstack.h
resource/csdk/stack/src/ocstack.c
resource/csdk/stack/test/stacktests.cpp
resource/src/OCResource.cpp
resource/unittests/OCResourceTest.cpp
service/scene-manager/src/SceneUtils.cpp