From 2ad2019078a4b289e25ead4ad93febd4d1d7a0e9 Mon Sep 17 00:00:00 2001 From: Todd Menier Date: Mon, 5 Jun 2017 16:31:11 -0500 Subject: [PATCH] temp fix for #179 --- Test/Flurl.Test.Shared/Http/RealHttpTests.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Test/Flurl.Test.Shared/Http/RealHttpTests.cs b/Test/Flurl.Test.Shared/Http/RealHttpTests.cs index a7145f09..762af15d 100644 --- a/Test/Flurl.Test.Shared/Http/RealHttpTests.cs +++ b/Test/Flurl.Test.Shared/Http/RealHttpTests.cs @@ -149,11 +149,16 @@ public async Task can_post_multipart() { try { using (var stream = File.OpenRead(path2)) { var resp = await "http://httpbin.org/post" - .PostMultipartAsync(content => content - .AddStringParts(new {a = 1, b = 2}) - .AddString("DataField", "hello!") - .AddFile("File1", path1) - .AddFile("File2", stream, "foo.txt")) + .PostMultipartAsync(content => { + content + .AddStringParts(new { a = 1, b = 2 }) + .AddString("DataField", "hello!") + .AddFile("File1", path1) + .AddFile("File2", stream, "foo.txt"); + + // hack to deal with #179, remove when this is fixed: https://github.com/kennethreitz/httpbin/issues/340 + content.Headers.ContentLength = 735; + }) //.ReceiveString(); .ReceiveJson(); Assert.AreEqual("1", resp.form.a);