Skip to content

Commit

Permalink
Treat empty ContentDisposition header as null. (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
HelloKitty authored Jul 4, 2021
1 parent ecfe76b commit d6a14f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AutoUpdater.NET/DownloadUpdateDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private void WebClientOnDownloadFileCompleted(object sender, AsyncCompletedEvent
}

ContentDisposition contentDisposition = null;
if (_webClient.ResponseHeaders?["Content-Disposition"] != null)
if (!String.IsNullOrWhiteSpace(_webClient.ResponseHeaders?["Content-Disposition"]))
{
contentDisposition = new ContentDisposition(_webClient.ResponseHeaders["Content-Disposition"]);
}
Expand Down Expand Up @@ -272,4 +272,4 @@ private void DownloadUpdateDialog_FormClosing(object sender, FormClosingEventArg
}
}
}
}
}

0 comments on commit d6a14f8

Please sign in to comment.