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

Promote SendFile extension methods to HttpResponse #544

Closed
wants to merge 1 commit into from

Conversation

khellang
Copy link
Contributor

}

// Not safe for overlapped writes.
private static async Task SendFileAsync(Stream outputStream, string fileName, long offset, long? length, CancellationToken cancellationToken)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we still want this fallback?

@khellang khellang force-pushed the send-file branch 2 times, most recently from c5276ac to ba3ece9 Compare January 22, 2016 10:01
@davidfowl
Copy link
Member

I'm not sure this should be on HttpResponse but I'll let others chime in

@khellang khellang force-pushed the send-file branch 3 times, most recently from 9ac0093 to 3cdcf78 Compare January 26, 2016 12:05
@@ -11,11 +11,13 @@
},
"dependencies": {
"Microsoft.AspNetCore.Http.Features": "1.0.0-*",
"Microsoft.Extensions.FileProviders.Abstractions": "1.0.0-*",
Copy link
Member

Choose a reason for hiding this comment

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

HttpAbstractions picking up a dependency on FileProviders is pretty strange.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not just FileProviders, it's FileProviders.Abstractions. In my head, it made sense that one abstraction package depends on another 😄

@Tratcher
Copy link
Member

👎 We don't even let WriteAsync(string) live directly on HttpResponse. SendFileAsync is even less common.

The IFileInfo overloads are interesting, but they belong in Extensions, not Abstractions, especially since they come with an added FileProviders dependency.

@khellang khellang force-pushed the send-file branch 2 times, most recently from bb0ab67 to 6f17912 Compare January 29, 2016 23:06
@davidfowl
Copy link
Member

+1 I think extension method + IFileInfo is good enough

@davidfowl
Copy link
Member

closing this

@davidfowl davidfowl closed this Feb 5, 2016
@khellang khellang deleted the send-file branch February 15, 2016 14:11
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