diff --git a/.paket/Paket.Restore.targets b/.paket/Paket.Restore.targets index 952ad42..4deb15b 100644 --- a/.paket/Paket.Restore.targets +++ b/.paket/Paket.Restore.targets @@ -20,7 +20,7 @@ proj assembly native - /Library/Frameworks/Mono.framework/Commands/mono + /Library/Frameworks/Mono.framework/Commands/mono mono @@ -28,41 +28,10 @@ $(PaketToolsPath)paket.bootstrapper.exe $([System.IO.Path]::GetDirectoryName("$(PaketBootStrapperExePath)"))\ - - - - $(PaketRootPath)paket.exe - $(PaketToolsPath)paket.exe - $(PaketToolsPath)paket.exe - $(_PaketBootStrapperExeDir)paket.exe - paket.exe - - - $(PaketRootPath)paket - $(PaketToolsPath)paket - $(PaketToolsPath)paket - - - $(PaketRootPath)paket.exe - $(PaketToolsPath)paket.exe - - - $(PaketBootStrapperExeDir)paket.exe - - - paket - - - <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)")) - dotnet "$(PaketExePath)" - $(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)" - "$(PaketExePath)" - - - "$(PaketBootStrapperExePath)" + "$(PaketBootStrapperExePath)" $(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)" - + true @@ -71,9 +40,73 @@ True + + False + $(BaseIntermediateOutputPath.TrimEnd('\').TrimEnd('\/')) + + + + + + + $(PaketRootPath)paket + $(PaketToolsPath)paket + + + + + + $(PaketRootPath)paket.exe + $(PaketToolsPath)paket.exe + + + + + + <_DotnetToolsJson Condition="Exists('$(PaketRootPath)/.config/dotnet-tools.json')">$([System.IO.File]::ReadAllText("$(PaketRootPath)/.config/dotnet-tools.json")) + <_ConfigContainsPaket Condition=" '$(_DotnetToolsJson)' != ''">$(_DotnetToolsJson.Contains('"paket"')) + <_ConfigContainsPaket Condition=" '$(_ConfigContainsPaket)' == ''">false + + + + + + + + + + + <_PaketCommand>dotnet paket + + + + + + $(PaketToolsPath)paket + $(PaketBootStrapperExeDir)paket + + + paket + + + + + <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)")) + <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(_PaketExeExtension)' == '.dll' ">dotnet "$(PaketExePath)" + <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(OS)' != 'Windows_NT' AND '$(_PaketExeExtension)' == '.exe' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)" + <_PaketCommand Condition=" '$(_PaketCommand)' == '' ">"$(PaketExePath)" + + + + + + + + + @@ -81,7 +114,7 @@ - + @@ -103,7 +136,7 @@ - $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[0].Replace(`"`, ``).Replace(` `, ``)) $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[1].Replace(`"`, ``).Replace(` `, ``)) @@ -126,7 +159,7 @@ This value should match the version in the props generated by paket If they differ, this means we need to do a restore in order to ensure correct dependencies --> - + true @@ -136,7 +169,7 @@ - + @@ -203,13 +236,16 @@ $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0]) $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1]) $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4]) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[6]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[7]) %(PaketReferencesFileLinesInfo.PackageVersion) All - runtime - runtime + runtime + $(ExcludeAssets);contentFiles + $(ExcludeAssets);build;buildMultitargeting;buildTransitive true true @@ -246,7 +282,7 @@ - + <_NuspecFilesNewLocation Include="$(PaketIntermediateOutputPath)\$(Configuration)\*.nuspec"/> @@ -256,14 +292,16 @@ $(MSBuildProjectDirectory)/$(MSBuildProjectFile) true + false + true false - true + true false true false - true + true false - true + true $(PaketIntermediateOutputPath)\$(Configuration) $(PaketIntermediateOutputPath) @@ -281,6 +319,55 @@ + + + PackageLicenseExpressionVersion="$(PackageLicenseExpressionVersion)" + NoDefaultExcludes="$(NoDefaultExcludes)" /> "stable release" diff --git a/HttpFs.IntegrationTests/AssemblyInfo.fs b/HttpFs.IntegrationTests/AssemblyInfo.fs index 94e020c..f683060 100644 --- a/HttpFs.IntegrationTests/AssemblyInfo.fs +++ b/HttpFs.IntegrationTests/AssemblyInfo.fs @@ -4,16 +4,16 @@ open System.Reflection [] [] -[] +[] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "HttpFs.IntegrationTests" let [] AssemblyProduct = "HttpFs.IntegrationTests" - let [] AssemblyCopyright = "Copyright © 2020" + let [] AssemblyCopyright = "Copyright © 2023" let [] AssemblyDescription = "A simple, functional HTTP client library for F#" - let [] AssemblyVersion = "5.4.0" - let [] AssemblyFileVersion = "5.4.0" + let [] AssemblyVersion = "5.4.1" + let [] AssemblyFileVersion = "5.4.1" diff --git a/HttpFs.IntegrationTests/HttpFs.IntegrationTests.fsproj b/HttpFs.IntegrationTests/HttpFs.IntegrationTests.fsproj index 58d65ee..ff39dc9 100644 --- a/HttpFs.IntegrationTests/HttpFs.IntegrationTests.fsproj +++ b/HttpFs.IntegrationTests/HttpFs.IntegrationTests.fsproj @@ -4,7 +4,7 @@ HttpFs.IntegrationTests HttpFs.IntegrationTests Exe - netcoreapp2.0;net471 + net7.0;net471 true diff --git a/HttpFs.IntegrationTests/HttpServer.fs b/HttpFs.IntegrationTests/HttpServer.fs index b482601..6b61943 100644 --- a/HttpFs.IntegrationTests/HttpServer.fs +++ b/HttpFs.IntegrationTests/HttpServer.fs @@ -123,6 +123,9 @@ let app = >=> Cookie.setCookie (HttpCookie.create "cookie1" "baboon" None (Some "/Invalid") None true true None ) >=> Successful.OK "" + Filters.path "/CookieNonAscii" + >=> Cookie.setCookie (HttpCookie.createKV "cookie1" "яЏ§§їДЙ") + >=> Successful.OK "body" Filters.path "/NoCookies" >=> Successful.OK "body" diff --git a/HttpFs.IntegrationTests/Tests.fs b/HttpFs.IntegrationTests/Tests.fs index b1ea3ea..a2edb7a 100644 --- a/HttpFs.IntegrationTests/Tests.fs +++ b/HttpFs.IntegrationTests/Tests.fs @@ -358,6 +358,16 @@ let tests = Expect.equal response.statusCode 200 "statusCode should be equal" } + testCaseAsync "cookies non ascii chars" <| async { + use! response = + Request.create Get (uriFor "/CookieNonAscii") + |> getResponse + |> Alt.toAsync + + Expect.equal response.statusCode 200 "statusCode should be equal" + Expect.equal (response.cookies.ContainsKey "cookie1") true "should be present" + } + testCaseAsync "reading the body as bytes works properly" <| async { use! response = Request.create Get (uriFor "/Raw") diff --git a/HttpFs.SampleApplication/HttpFs.SampleApplication.fsproj b/HttpFs.SampleApplication/HttpFs.SampleApplication.fsproj index 2007fa1..359801d 100644 --- a/HttpFs.SampleApplication/HttpFs.SampleApplication.fsproj +++ b/HttpFs.SampleApplication/HttpFs.SampleApplication.fsproj @@ -4,7 +4,7 @@ HttpFs.SampleApplication HttpFs.SampleApplication Exe - netcoreapp2.0 + net7.0 false true diff --git a/HttpFs.SamplePostApplication/HttpClient.SamplePostApplication.fsproj b/HttpFs.SamplePostApplication/HttpClient.SamplePostApplication.fsproj index 7f379e0..d091de9 100644 --- a/HttpFs.SamplePostApplication/HttpClient.SamplePostApplication.fsproj +++ b/HttpFs.SamplePostApplication/HttpClient.SamplePostApplication.fsproj @@ -4,7 +4,7 @@ HttpFs.SamplePostApplication HttpFs.SamplePostApplication Exe - netcoreapp2.0;net471 + net7.0;net471 false true diff --git a/HttpFs.UnitTests/AssemblyInfo.fs b/HttpFs.UnitTests/AssemblyInfo.fs index eecfdf6..016c32b 100644 --- a/HttpFs.UnitTests/AssemblyInfo.fs +++ b/HttpFs.UnitTests/AssemblyInfo.fs @@ -4,16 +4,16 @@ open System.Reflection [] [] -[] +[] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "HttpFs.UnitTests" let [] AssemblyProduct = "HttpFs.UnitTests" - let [] AssemblyCopyright = "Copyright © 2020" + let [] AssemblyCopyright = "Copyright © 2023" let [] AssemblyDescription = "A simple, functional HTTP client library for F#" - let [] AssemblyVersion = "5.4.0" - let [] AssemblyFileVersion = "5.4.0" + let [] AssemblyVersion = "5.4.1" + let [] AssemblyFileVersion = "5.4.1" diff --git a/HttpFs.UnitTests/HttpFs.UnitTests.fsproj b/HttpFs.UnitTests/HttpFs.UnitTests.fsproj index d2963a4..3ef808c 100644 --- a/HttpFs.UnitTests/HttpFs.UnitTests.fsproj +++ b/HttpFs.UnitTests/HttpFs.UnitTests.fsproj @@ -4,7 +4,7 @@ HttpFs.UnitTests HttpFs.UnitTests Exe - netcoreapp2.0;net471 + net7.0;net471 true diff --git a/HttpFs/AssemblyInfo.fs b/HttpFs/AssemblyInfo.fs index d8cf7c3..4c98ba9 100644 --- a/HttpFs/AssemblyInfo.fs +++ b/HttpFs/AssemblyInfo.fs @@ -4,16 +4,16 @@ open System.Reflection [] [] -[] +[] [] -[] -[] +[] +[] do () module internal AssemblyVersionInformation = let [] AssemblyTitle = "HttpFs" let [] AssemblyProduct = "HttpFs" - let [] AssemblyCopyright = "Copyright © 2020" + let [] AssemblyCopyright = "Copyright © 2023" let [] AssemblyDescription = "A simple, functional HTTP client library for F#" - let [] AssemblyVersion = "5.4.0" - let [] AssemblyFileVersion = "5.4.0" + let [] AssemblyVersion = "5.4.1" + let [] AssemblyFileVersion = "5.4.1" diff --git a/HttpFs/HttpFs.fsproj b/HttpFs/HttpFs.fsproj index 89c4f28..23d6767 100644 --- a/HttpFs/HttpFs.fsproj +++ b/HttpFs/HttpFs.fsproj @@ -3,8 +3,8 @@ HttpFs Http.fs - 5.4.0 - netstandard2.0;net471 + 5.4.1 + netstandard2.1;net471 diff --git a/HttpFs/paket.template b/HttpFs/paket.template index 8aee4d0..7738445 100644 --- a/HttpFs/paket.template +++ b/HttpFs/paket.template @@ -9,12 +9,12 @@ dependencies framework: net471 FSharp.Core >= LOCKEDVERSION Hopac >= LOCKEDVERSION - framework: netstandard2.0 + framework: netstandard2.1 FSharp.Core >= LOCKEDVERSION Hopac >= LOCKEDVERSION files - bin/Release/netstandard2.0/HttpFs.dll ==> lib/netstandard2.0 - bin/Release/netstandard2.0/HttpFs.xml ==> lib/netstandard2.0 + bin/Release/netstandard2.1/HttpFs.dll ==> lib/netstandard2.1 + bin/Release/netstandard2.1/HttpFs.xml ==> lib/netstandard2.1 bin/Release/net471/HttpFs.dll ==> lib/net471 bin/Release/net471/HttpFs.xml ==> lib/net471 \ No newline at end of file diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index e3498f1..978ccdb 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,5 @@ +#### 5.4.1 — 2023-08-02 +* netstandard 2.1 upgrade #### 5.4.0 — 2018-06-27 * Delete verb now supports body * Support for custom http method diff --git a/Rakefile b/Rakefile index 12ed3de..989033e 100644 --- a/Rakefile +++ b/Rakefile @@ -70,7 +70,7 @@ end namespace :tests do task :integration do - Kernel.system({"TEST_PORT" => "2345"}, "dotnet run -p HttpFs.IntegrationTests -c #{Configuration} --no-restore --no-build --framework netcoreapp2.0") + Kernel.system({"TEST_PORT" => "2345"}, "dotnet run -p HttpFs.IntegrationTests -c #{Configuration} --no-restore --no-build --framework net7.0") system "HttpFs.IntegrationTests/bin/#{Configuration}/net471/HttpFs.IntegrationTests.exe", clr_command: true end task :unit do diff --git a/appveyor.yml b/appveyor.yml index b6970bb..2ddbbfc 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -image: Visual Studio 2017 +image: Visual Studio 2022 build_script: - cmd: build.cmd diff --git a/build.fsx b/build.fsx index a8ad354..aece1a5 100644 --- a/build.fsx +++ b/build.fsx @@ -56,18 +56,18 @@ let build project framework = }) Target "BuildTest" (fun _ -> - build "HttpFs.UnitTests/HttpFs.UnitTests.fsproj" "netcoreapp2.0" + build "HttpFs.UnitTests/HttpFs.UnitTests.fsproj" "net7.0" build "HttpFs.UnitTests/HttpFs.UnitTests.fsproj" "net471" - build "HttpFs.IntegrationTests/HttpFs.IntegrationTests.fsproj" "netcoreapp2.0" + build "HttpFs.IntegrationTests/HttpFs.IntegrationTests.fsproj" "net7.0" build "HttpFs.IntegrationTests/HttpFs.IntegrationTests.fsproj" "net471" ) Target "RunTest" (fun _ -> - DotNetCli.RunCommand id ("HttpFs.UnitTests/bin/"+configuration+"/netcoreapp2.0/HttpFs.UnitTests.dll --summary --sequenced") + DotNetCli.RunCommand id ("HttpFs.UnitTests/bin/"+configuration+"/net7.0/HttpFs.UnitTests.dll --summary --sequenced") //Shell.Exec ("HttpFs.UnitTests/bin/"+configuration+"/net471/HttpFs.UnitTests.exe","--summary --sequenced") //|> fun r -> if r<>0 then failwith "HttpFs.UnitTests.exe failed" - DotNetCli.RunCommand id ("HttpFs.IntegrationTests/bin/"+configuration+"/netcoreapp2.0/HttpFs.IntegrationTests.dll --summary --sequenced") + DotNetCli.RunCommand id ("HttpFs.IntegrationTests/bin/"+configuration+"/net7.0/HttpFs.IntegrationTests.dll --summary --sequenced") //Shell.Exec ("HttpFs.IntegrationTests/bin/"+configuration+"/net471/HttpFs.IntegrationTests.exe","--summary --sequenced") //|> fun r -> if r<>0 then failwith "HttpFs.IntegrationTests.exe failed" )