Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation and tests - non seekable multipart form files #1415

Merged
merged 3 commits into from
Nov 25, 2021

Conversation

ordinaryorange
Copy link
Contributor

Refer #1398

src/Net/Http.fs Outdated
override x.CanWrite = false
override x.Length with get () = length
override x.Length with get () = length |> Option.defaultWith (fun () -> NotSupportedException() |> raise)
Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you think about a more descriptive message like in Stream? https://docs.microsoft.com/en-us/dotnet/api/system.io.stream.length?view=net-6.0#exceptions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If flipped on this a couple of times. But now rethinking, I reckon a simple failwith "One or more of the encompassed streams are not seekable and the length cannot be determined". We can probably do away with the NotSupportedException type as the CombinedStream is only internal to FSharp.data

Copy link
Collaborator

@cartermp cartermp left a comment

Choose a reason for hiding this comment

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

Thank you! Will cut a release likely beginning of next week.

@cartermp cartermp merged commit a66b043 into fsprojects:main Nov 25, 2021
@cartermp
Copy link
Collaborator

Should be live in NuGet promptly

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

Successfully merging this pull request may close these issues.

2 participants