     ///
     /// BodyParser archiver
     ///
-    private static let parserMap: [String: ((NSMutableData) -> ParsedBody?)] = ["application/json": BodyParser.parseJson,
-                                                                                "application/x-www-form-urlencoded": BodyParser.parseURLencoded,
-                                                                                "text": BodyParser.parseText]
-    
+    private static let parserMap: [String: ((NSData) -> ParsedBody?)] =
+        ["application/json": BodyParser.parseJSON,
+         "application/x-www-form-urlencoded": BodyParser.parseURLencoded,
+         "text": BodyParser.parseText]
+
+    private class var newLineData: NSData {
+        guard let newLineData = "\r\n".data(using: NSUTF8StringEncoding) else {
+            Log.error("Error converting string to new line data for multipart parsing")
+            exit(1)
+        }
+        return newLineData
+    }
+
     ///
     /// Initializes a BodyParser instance
     /// Needed since default initalizer is internal

    ///
    /// - Parameter bodyData: read data
    ///
    private class func parseURLencoded(_ bodyData: NSMutableData)-> ParsedBody? {
        var parsedBody = [String:String]()
        var success = true
        if let bodyAsString: String = String(data: bodyData, encoding: NSUTF8StringEncoding) {

    ///
    /// - Parameter bodyData: read data
    ///
    private class func parseText(_ bodyData: NSData)-> ParsedBody? {
        // There was no support for the application/json MIME type
        if let bodyAsString: String = String(data: bodyData, encoding: NSUTF8StringEncoding) {
            return .text(bodyAsString)
