You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Thow exception in Polymath.cs MakeRequestAsync method then execute PatchSecretAsync(), because cannot remove from http message headers, 'Content-Type' header.
VaultSharp Version
1.7.2
Vault Version
1.12.2
Does this work with Vault CLI?
Yes
Sample Code Snippet
Non-confidential snippet of code
Exception Details/Stack Trace/Error Message
Unhandled exception. System.AggregateException: One or more errors occurred. (Misused header name, 'Content-Type'. Make sure request headers are used with HttpRequestMessage, response headers with HttpResponseMessage, and content headers with HttpContent objects.)
---> System.InvalidOperationException: Misused header name, 'Content-Type'. Make sure request headers are used with HttpRequestMessage, response headers with HttpResponseMessage, and content headers with HttpContent objects.
at System.Net.Http.Headers.HttpHeaders.GetHeaderDescriptor(String name)
at System.Net.Http.Headers.HttpHeaders.Remove(String name)
at VaultSharp.Core.Polymath.MakeRequestAsync[TResponse](String resourcePath, HttpMethod httpMethod, Object requestData, IDictionary`2 headers, Boolean rawResponse, Action`1 postResponseAction)
at VaultSharp.Core.Polymath.MakeVaultApiRequest[TResponse](String resourcePath, HttpMethod httpMethod, Object requestData, Boolean rawResponse, Action`1 postResponseAction, String wrapTimeToLive, Boolean unauthenticated)
at VaultSharp.Core.Polymath.MakeVaultApiRequest[TResponse](String mountPoint, String path, HttpMethod httpMethod, Object requestData, Boolean rawResponse, Action`1 postResponseAction, String wrapTimeToLive, Boolean unauthenticated)
at VaultSharp.V1.SecretsEngines.KeyValue.V2.KeyValueSecretsEngineV2Provider.PatchSecretAsync(String path, PatchSecretDataRequest patchSecretDataRequest, String mountPoint)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at Program.<Main>$(String[] args) in /Users/ekovalenok/Repositories/common-vault/samples/Vault.Sample/Program.cs:line 65
Any additional info
Version 1.7.1 work fine
In 1.7.2 trying remove header 'Content-Type' that does not exist in httpRequestMessage.Headers
The text was updated successfully, but these errors were encountered:
Describe the bug
Thow exception in Polymath.cs MakeRequestAsync method then execute PatchSecretAsync(), because cannot remove from http message headers, 'Content-Type' header.
VaultSharp Version
1.7.2
Vault Version
1.12.2
Does this work with Vault CLI?
Yes
Sample Code Snippet
Non-confidential snippet of code
Exception Details/Stack Trace/Error Message
Any additional info
Version 1.7.1 work fine
In 1.7.2 trying remove header 'Content-Type' that does not exist in httpRequestMessage.Headers
The text was updated successfully, but these errors were encountered: