lib/semantic_logger/appender/http.rb in semantic_logger-4.0.0.beta1 vs lib/semantic_logger/appender/http.rb in semantic_logger-4.0.0.beta2

- old
+ new

@@ -99,15 +99,17 @@ } @header['Content-Encoding'] = 'gzip' if @compress uri = URI.parse(@url) @server = uri.host - raise(ArgumentError, "Invalid format for :url: #{@url.inspect}. Should be similar to: 'http://hostname:port/path'") unless @url + raise(ArgumentError, "Invalid format for :url: #{@url.inspect}. Should be similar to: 'http://hostname:port/path'") unless @server @port = uri.port @username = uri.user if !@username && uri.user @password = uri.password if !@password && uri.password @path = uri.path + # Path cannot be empty + @path = '/' if @path == '' if uri.scheme == 'https' @ssl_options ||= {} @ssl_options[:use_ssl] = true @ssl_options[:verify_mode] ||= OpenSSL::SSL::VERIFY_PEER