logstash-plugins / logstash-input-websocket

Apache License 2.0
13 stars 18 forks source link

Empty configuration results in InvalidURIError exception #8

Closed magnusbaeck closed 8 years ago

magnusbaeck commented 8 years ago

As reported by @pilebones in #7, a defaults-only configuration,

input {
  websocket {
  }
}

results in the following error message:

Addressable::URI::InvalidURIError: Hostname not supplied: '0.0.0.0'

This is because the default options of url => "0.0.0.0" and mode => "client" don't make sense; a 0.0.0.0 URL would only be valid if run the plugin is run in server mode but that's not the default and it doesn't even work (see #3). We should make url formally required since it effectively is anyway. Once server mode is implemented maybe we can relax this restriction if the plugin is configured for server mode.