       console.error "[respond] Error: #{err}"
       return
     # Write the response
+    if DEBUG_RTSP
+      console.log "===RTSP response==="
     if output instanceof Array
       for out, i in output
+        if DEBUG_RTSP
+          console.log out
         c.write out
     else
+      if DEBUG_RTSP
+        process.stdout.write output
       c.write output
+    if DEBUG_RTSP
+      console.log "==================="
     if resultOpts?.close
       console.log "[#{c.clientID}] end"
       c.end()

  'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
  'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec',
]

# If true, RTSP requests/responses tunneled in HTTP will be
# printed to the console

    bufString = c.buf.toString 'utf8'
    if bufString.indexOf('\r\n\r\n') is -1
      return
    if DEBUG_RTSP
      console.log "===RTSP request==="
      process.stdout.write bufString
      console.log "=================="
    req = parseRequest bufString
    if not req?
      console.warn "error: request can't be parsed: #{bufString}"
