Skip to content

Commit

Permalink
Merge pull request #82 from cyberark/fix-mime-type
Browse files Browse the repository at this point in the history
Fix malformed mime type
  • Loading branch information
szh authored Mar 4, 2022
2 parents af98e95 + 868de96 commit 5ec1295
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ 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).

## [Unreleased]
### Fixed
- Fix mime type "text/plain"
[cyberark/conjur-api-dotnet#82](https://github.com/cyberark/conjur-api-dotnet/pull/82)

## [2.1.0] - 2021-09-08
### Added
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pipeline {
BUILD_NAME = "${env.BUILD_NUMBER}-${env.BRANCH_NAME.replace('/','-')}"
sh "summon -e pipeline ./build.sh ${BUILD_NAME}"
}
step([$class: 'XUnitBuilder',
step([$class: 'XUnitPublisher',
tools: [[$class: 'NUnitJunitHudsonTestType', pattern: 'TestResult.xml']]])
archiveArtifacts artifacts: 'bin/*', fingerprint: true
}
Expand Down
2 changes: 1 addition & 1 deletion conjur-api/Variable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void AddSecret(byte[] val)
(webRequest as HttpWebRequest).AllowWriteStreamBuffering = false;
}

webRequest.ContentType = "text\\plain";
webRequest.ContentType = "text/plain";
webRequest.ContentLength = val.Length;
using (Stream requestStream = webRequest.GetRequestStream())
{
Expand Down
2 changes: 1 addition & 1 deletion test/VariablesTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void AddSecretTest()
{
MockRequest req = wr as WebMocker.MockRequest;
Assert.AreEqual(WebRequestMethods.Http.Post, wr.Method);
Assert.AreEqual("text\\plain", wr.ContentType);
Assert.AreEqual("text/plain", wr.ContentType);
Assert.AreEqual(testValue, req.Body);
};
Client.Variable("foobar").AddSecret(Encoding.UTF8.GetBytes(testValue));
Expand Down

0 comments on commit 5ec1295

Please sign in to comment.