Skip to content

Commit

Permalink
Fix HttpAuthTasks dispose CreateFormDataContent
Browse files Browse the repository at this point in the history
  • Loading branch information
ricaun committed Jan 19, 2025
1 parent bf34add commit 2c902c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.9.2 / 2025-01-19
## [1.9.2] / 2025-01-19
### Updated
- Add `NuGetTasks` delete, sign and verify.
### Fixed
- Fix `HttpAuthTasks` dispose `CreateFormDataContent`.

## [1.9.1] / 2025-01-03
### Updated
Expand Down
6 changes: 3 additions & 3 deletions ricaun.Nuke/IO/HttpAuthTasks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static async Task<string> HttpPostFileAsync(
Configure<HttpClient> clientConfigurator = null,
Action<HttpRequestHeaders> headerConfigurator = null)
{
var content = CreateFormDataContent(filePath, formData, fileStreamContentName);
using var content = CreateFormDataContent(filePath, formData, fileStreamContentName);
return await HttpPostAsync(uri, content, authorization, clientConfigurator, headerConfigurator);
}

Expand Down Expand Up @@ -162,7 +162,7 @@ public static async Task<string> HttpPutFileAsync(
Configure<HttpClient> clientConfigurator = null,
Action<HttpRequestHeaders> headerConfigurator = null)
{
var content = CreateFormDataContent(filePath, formData, fileStreamContentName);
using var content = CreateFormDataContent(filePath, formData, fileStreamContentName);
return await HttpPostAsync(uri, content, authorization, clientConfigurator, headerConfigurator);
}

Expand Down Expand Up @@ -286,7 +286,7 @@ public static async Task<string> HttpPatchFileAsync(
Configure<HttpClient> clientConfigurator = null,
Action<HttpRequestHeaders> headerConfigurator = null)
{
var content = CreateFormDataContent(filePath, formData, fileStreamContentName);
using var content = CreateFormDataContent(filePath, formData, fileStreamContentName);
return await HttpPostAsync(uri, content, authorization, clientConfigurator, headerConfigurator);
}

Expand Down

0 comments on commit 2c902c5

Please sign in to comment.