     ///   - task:              The task that needs a new body stream.
     ///   - completionHandler: A completion handler that your delegate method should call with the new body stream.
     public func urlSession(_ session: URLSession, task: URLSessionTask, needNewBodyStream completionHandler: @escaping (InputStream?) -> Swift.Void) {
-        taskOfSessionNeedNewBodyStream?(task, session, completionHandler)
+        if let needNewBodyStream = taskOfSessionNeedNewBodyStream {
+            needNewBodyStream(task, session, completionHandler)
+            return
+        }
+        
+        completionHandler(nil)
     }
     /// Periodically informs the delegate of the progress of sending body content to the server.
     /// - Parameters:

    ///   - completionHandler: A block that your handler should call with either the value of the request parameter, 
    ///                        a modified URL request object, or NULL to refuse the redirect and return the body of the redirect response.
    public func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Swift.Void) {
        taskOfSessionWillPerformHTTPRedirection?(task, session, response, request, completionHandler)
    }
    /// Requests credentials from the delegate in response to an authentication request from the remote server.
    /// This method handles task-level authentication challenges. The URLSessionDelegate protocol also provides a session-level authentication

            return
        }
        // Run default configuration of challenge:
        // Cancel challenge if failed many times.
        guard challenge.previousFailureCount == 0 else {
            challenge.sender?.cancel(challenge)
