             if  contentLength == nil  {
                 setHeader("Content-Length", value: String(buffer.count))
             }
+            addCookies()
+
             if  request.method != .Head  {
                 try response.writeData(data)
             }

        invokedEnd = true
        try response.end()
        return self
    }

    ///

    /// Whether the response has ended
    ///
    var invokedEnd = false

    ///
    /// Set of cookies to return with the response
    ///
    public var cookies = [String: NSHTTPCookie]()

    ///
    /// Optional error value
    ///
    public var error: NSError?

    ///
    /// Initializes a RouterResponse instance
    ///
