From 10fa49054004a41944a8835eb503a76f14121fbf Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Thu, 16 Jan 2025 16:27:12 +0100 Subject: [PATCH 1/4] Update HTTPBinding.js --- lib/bindings/HTTPBinding.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bindings/HTTPBinding.js b/lib/bindings/HTTPBinding.js index bfb64b4ed..6ac7b6ffa 100644 --- a/lib/bindings/HTTPBinding.js +++ b/lib/bindings/HTTPBinding.js @@ -506,7 +506,7 @@ function handleError(error, req, res, next) { function setPollingAndDefaultTransport(device, group, callback) { config.getLogger().debug(context, 'httpbinding.setPollingAndDefaultTransport device %j group %j', device, group); if (!device.transport) { - device.transport = group && group.transport ? group.transport : 'HTTP'; + device.transport = group && group.transport ? group.transport : config.getConfig().defaultTransport; } if (device.transport === 'HTTP') { From cce05903c01a1e24a448beee892422c3c550b48a Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Thu, 16 Jan 2025 17:26:05 +0100 Subject: [PATCH 2/4] fix defaultTransport for tests --- test/unit/ngsiv2/config-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/ngsiv2/config-test.js b/test/unit/ngsiv2/config-test.js index 3289133d3..62b1985df 100644 --- a/test/unit/ngsiv2/config-test.js +++ b/test/unit/ngsiv2/config-test.js @@ -69,6 +69,6 @@ config.iota = { }; config.defaultKey = '1234'; -config.defaultTransport = 'MQTT'; +config.defaultTransport = 'HTTP'; module.exports = config; From 8e059b00915fc8b07054b25d76359a722658e141 Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Fri, 17 Jan 2025 09:45:14 +0100 Subject: [PATCH 3/4] Update CHANGES_NEXT_RELEASE --- CHANGES_NEXT_RELEASE | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE index 89a933723..aadcbdda9 100644 --- a/CHANGES_NEXT_RELEASE +++ b/CHANGES_NEXT_RELEASE @@ -1 +1,2 @@ +- Use config.defaultTransport (from config.js or IOTA_DEFAULT_TRANSPORT env var) instead of magic 'HTTP' at provision device - Add: X-Processing-Time response header with processing time (in milliseconds) expended by current HTTP measure (iotagent-node-lib#1650) From c7c7f023ea74a432e73357b2267b50791718dd22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferm=C3=ADn=20Gal=C3=A1n=20M=C3=A1rquez?= Date: Mon, 20 Jan 2025 10:15:30 +0100 Subject: [PATCH 4/4] Update CHANGES_NEXT_RELEASE --- CHANGES_NEXT_RELEASE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE index aadcbdda9..a7b41c9ba 100644 --- a/CHANGES_NEXT_RELEASE +++ b/CHANGES_NEXT_RELEASE @@ -1,2 +1,2 @@ -- Use config.defaultTransport (from config.js or IOTA_DEFAULT_TRANSPORT env var) instead of magic 'HTTP' at provision device +- Fix: use config.defaultTransport (from config.js or IOTA_DEFAULT_TRANSPORT env var) instead of magic 'HTTP' at provision device - Add: X-Processing-Time response header with processing time (in milliseconds) expended by current HTTP measure (iotagent-node-lib#1650)