     )
 
 # parse headers using http module parser
+# this api is not documented nor stable, might break in the future
 parseHeaders = (msg, callback) ->
     parser = http.parsers.alloc()
-    parser.reinitialize('request')
+    parser.reinitialize 'request'
     parser.onIncoming = (req) ->
-        http.parsers.free(parser)
+        http.parsers.free parser
         callback null, req
     parser.execute msg, 0, msg.length

    for header in includeHeaders
        message.push "#{header.toUpperCase()}: #{customHeaders[header] or defaultHeaders[header]}"

    debug message.join ', '
    # add carriage returns and new lines as required by HTTP spec
    message.push '\r\n'
    new Buffer message.join '\r\n'

    [ '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) ->
