Skip to content

Inconsistencies across various configurations of HTTP listen endpoints #19

@aegagros

Description

@aegagros

HTTP listener endpoints are used in three different places in the configuration:

  1. When defining a publish target with method listen
  2. When defining a publish target with method registry-v2
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinvalidThis doesn't seem right

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions