HTTP listener endpoints are used in three different places in the configuration:
- When defining a publish target with method
listen
- When defining a publish target with method
registry-v2
- When defining a device type
cwmp, in the server field
The addr field in the above cases is interpreted in different ways. For (1) and (3), it is read with url.Parse(), hence it requires a schema prefix as well as a host. For (2) it is passed directly to the http.Server.Addr so it accepts values like <host>:<port> or :port and does not accept schema.
Furthermore, although (1) requires a schema, it does not respect https and does not read the user-provided certificate fields so that it can spawn an https listener.
A common approach must be implemented; a listener should accept only :, in the same way that (2) is currently doing. User-provided certificate data should be respected to spawn TLS enabled https listeners.
HTTP listener endpoints are used in three different places in the configuration:
listenregistry-v2cwmp, in theserverfieldThe
addrfield in the above cases is interpreted in different ways. For (1) and (3), it is read withurl.Parse(), hence it requires a schema prefix as well as a host. For (2) it is passed directly to thehttp.Server.Addrso it accepts values like<host>:<port>or:portand does not accept schema.Furthermore, although (1) requires a schema, it does not respect
httpsand does not read the user-provided certificate fields so that it can spawn an https listener.A common approach must be implemented; a listener should accept only :, in the same way that (2) is currently doing. User-provided certificate data should be respected to spawn TLS enabled https listeners.