Skip to content

Commit cc64673

Browse files
SchlenkRSchlenkR
authored andcommitted
Merge branch 'master' of https://github.com/fsprojects/FsHttp
2 parents a988076 + da0f78e commit cc64673

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/FsHttp/Helper.fs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ type StringBuilder with
2626

2727
member sb.appendSection(s: string) =
2828
sb.appendLine s
29-
30-
String([ 0 .. s.Length ] |> List.map (fun _ -> '-') |> List.toArray)
31-
|> sb.appendLine
29+
String('-', s.Length + 1) |> sb.appendLine
3230

3331
[<RequireQualifiedAccess>]
3432
module Map =
@@ -96,7 +94,7 @@ module Stream =
9694

9795
let copyToCallbackAsync (target: Stream) callback (source: Stream) =
9896
async {
99-
let buffer = Array.create 1024 (byte 0)
97+
let buffer = Array.create 81920 (byte 0) // 80KB matches .NET's Stream.CopyToAsync default buffer size
10098
let logTimeSpan = TimeSpan.FromSeconds 1.5
10199
let mutable continueLooping = true
102100
let mutable overallBytesCount = 0

0 commit comments

Comments
 (0)