 
     next = ->
 
-      if ++index is length
+      if ++index is pipes.length
         res.status 404
         res.setHeader "Content-Type", "application/json"
         res.send {error: "Nothing exists here. Sorry!"}

    app.use compression()

  # The array of request handlers.
  app.pipes = []

  app.addPipe = (pipe) ->
    assertType pipe, Function
    app.pipes.push pipe
    return

  app.addPipes = (pipes) ->
    for pipe in pipes
      assertType pipe, Function
      app.pipes.push pipe
    return

  # Context shared by all requests.
  app.context = {}

    context = app.createContext req, res
    setProto context, app.context

    index = -1

    measure = Function.prototype
