Skip to content

Commit

Permalink
Fixed OpenPgpContext.RetrievePublicKeyRingAsync() to use the filtered…
Browse files Browse the repository at this point in the history
… stream

Not all cases used the filtered stream previously.
  • Loading branch information
jstedfast committed Jan 2, 2018
1 parent 3bf985d commit 4f0b4d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MimeKit/Cryptography/OpenPgpContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ async Task<PgpPublicKeyRing> RetrievePublicKeyRingAsync (long keyId, bool doAsyn

if (doAsync) {
using (var response = await client.GetAsync (uri.ToString (), cancellationToken))
await response.Content.CopyToAsync (stream);
await response.Content.CopyToAsync (filtered);
} else {
#if !NETSTANDARD && !PORTABLE
var request = (HttpWebRequest) WebRequest.Create (uri.ToString ());
Expand All @@ -545,7 +545,7 @@ async Task<PgpPublicKeyRing> RetrievePublicKeyRingAsync (long keyId, bool doAsyn
}
#else
using (var response = client.GetAsync (uri.ToString (), cancellationToken).GetAwaiter ().GetResult ())
response.Content.CopyToAsync (stream).GetAwaiter ().GetResult ();
response.Content.CopyToAsync (filtered).GetAwaiter ().GetResult ();
#endif
}

Expand Down

0 comments on commit 4f0b4d8

Please sign in to comment.