     for header in includeHeaders
         message.push "#{header.toUpperCase()}: #{customHeaders[header] or defaultHeaders[header]}"
 
-    debug message.join ', '
+    debug message.join '\n      '
     # add carriage returns and new lines as required by HTTP spec
     message.push '\r\n'
     new Buffer message.join '\r\n'

        ext: ''
        usn: config.uuid + (if config.uuid is (customHeaders.nt or customHeaders.st) then '' else '::' + (customHeaders.nt or customHeaders.st))

    # specified headers are included in every request, merge them with headers passed to function
    includeHeaders = ['cache-control','server','usn','location'].concat Object.keys customHeaders

    # build message string

    [ 'upnp:rootdevice'
      config.uuid
      device.makeDeviceType dev.type
    ].concat(device.makeServiceType(s) for s in config.devices[dev.type].services)

# create a UDP socket, send messages, then close socket
sendMessages = (messages, address, port) ->
