     guard !self.isDetermined else { return false }
 
     // try to propagate the cancellation upstream
-    urlSessionTask.cancel()
+    urlSessionTask?.cancel()
     return true
   }
 

  public func deferredUploadTask(qos: DispatchQoS = .current,
                                 with request: URLRequest, fromData bodyData: Data) -> DeferredURLSessionTask<(Data, HTTPURLResponse)>
  {
    let tbd = TBD<(Data, HTTPURLResponse)>(qos: qos)

    let scheme = request.url?.scheme
    if scheme != "http" && scheme != "https"
    {
      let message = "deferred does not support url scheme \"\(scheme ?? "unknown")\""
      tbd.determine(error: DeferredError.invalid(message))
    }

    let task = uploadTask(with: request, from: bodyData, completionHandler: dataCompletion(tbd))
    return DeferredURLSessionTask(source: tbd, task: task)
  }

  public func deferredUploadTask(qos: DispatchQoS = .current,
                                 with request: URLRequest, fromFile fileURL: URL) -> DeferredURLSessionTask<(Data, HTTPURLResponse)>
  {
    let tbd = TBD<(Data, HTTPURLResponse)>(qos: qos)

    let scheme = request.url?.scheme
    if scheme != "http" && scheme != "https"
    {
      let message = "deferred does not support url scheme \"\(scheme ?? "unknown")\""
      tbd.determine(error: DeferredError.invalid(message))
    }

    let task = uploadTask(with: request, fromFile: fileURL, completionHandler: dataCompletion(tbd))
    return DeferredURLSessionTask(source: tbd, task: task)
  }
}

private class DeferredDownloadTask<Value>: DeferredURLSessionTask<Value>
{
  init(source: TBD<Value>, task: URLSessionDownloadTask)
  {
    super.init(source: source, task: task)
  }

  @discardableResult
  override func cancel(_ reason: String = "") -> Bool
  {

  public func deferredDownloadTask(qos: DispatchQoS = .current,
                                   with request: URLRequest) -> DeferredURLSessionTask<(URL, HTTPURLResponse)>
  {
    do { try validateURL(request) }
    catch {
      return DeferredURLSessionTask(qos: qos, error: error)
    }

    return DeferredDownloadTask(qos: qos) {
      downloadTask(with: request, completionHandler: downloadCompletion($0))
    }
  }

  public func deferredDownloadTask(qos: DispatchQoS = .current,
