Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Don't throw in HttpRequestStream.Flush #2342

Merged
merged 1 commit into from
Feb 23, 2018
Merged

Conversation

kekekeks
Copy link
Contributor

Because read-only streams apparently can have Flush semantics and this behavior is expected by some of built-in stream wrappers (e. g. CryptoStream)

dotnet/corefx#27327 (review)
#2341

@davidfowl
Copy link
Member

@kekekeks you need to fix the tests

@dnfclas
Copy link

dnfclas commented Feb 22, 2018

CLA assistant check
All CLA requirements met.

@@ -38,7 +38,6 @@ public override long Position

public override void Flush()
{
throw new NotSupportedException();
}

public override Task FlushAsync(CancellationToken cancellationToken)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably this should return Task.CompletedTask instead of throwing?

Copy link
Member

@davidfowl davidfowl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FlushAsync needs the same change

@kekekeks
Copy link
Contributor Author

👌

Because read-only streams apparently can have Flush semantics and this behavior is expected by some of built-in stream wrappers (e. g. CryptoStream)

dotnet/corefx#27327 (review)
aspnet#2341
@davidfowl davidfowl merged commit 39951e8 into aspnet:dev Feb 23, 2018
@davidfowl
Copy link
Member

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants