diff --git a/HttpAbstractions.sln b/HttpAbstractions.sln index c4043ac0a1..5158aff09e 100644 --- a/HttpAbstractions.sln +++ b/HttpAbstractions.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 -VisualStudioVersion = 14.0.21628.1 +VisualStudioVersion = 14.0.21813.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A5A15F1C-885A-452A-A731-B0173DDBD913}" EndProject @@ -25,6 +25,10 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Owin", "sr EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Owin.Tests", "test\Microsoft.AspNet.Owin.Tests\Microsoft.AspNet.Owin.Tests.kproj", "{16219571-3268-4D12-8689-12B7163DBA13}" EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Http.Extensions", "src\Microsoft.AspNet.Http.Extensions\Microsoft.AspNet.Http.Extensions.kproj", "{CCC4363E-81E2-4058-94DD-00494E9E992A}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Http.Extensions.Tests", "test\Microsoft.AspNet.Http.Extensions.Tests\Microsoft.AspNet.Http.Extensions.Tests.kproj", "{AE25EF21-7F91-4B86-B73E-AF746821D339}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -35,105 +39,116 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {BCF0F967-8753-4438-BD07-AADCA9CE509A}.Debug|Any CPU.ActiveCfg = Debug|x86 - {BCF0F967-8753-4438-BD07-AADCA9CE509A}.Debug|Any CPU.Build.0 = Debug|x86 - {BCF0F967-8753-4438-BD07-AADCA9CE509A}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {BCF0F967-8753-4438-BD07-AADCA9CE509A}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {BCF0F967-8753-4438-BD07-AADCA9CE509A}.Debug|x86.ActiveCfg = Debug|x86 - {BCF0F967-8753-4438-BD07-AADCA9CE509A}.Debug|x86.Build.0 = Debug|x86 - {BCF0F967-8753-4438-BD07-AADCA9CE509A}.Release|Any CPU.ActiveCfg = Release|x86 - {BCF0F967-8753-4438-BD07-AADCA9CE509A}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {BCF0F967-8753-4438-BD07-AADCA9CE509A}.Release|Mixed Platforms.Build.0 = Release|x86 - {BCF0F967-8753-4438-BD07-AADCA9CE509A}.Release|x86.ActiveCfg = Release|x86 - {BCF0F967-8753-4438-BD07-AADCA9CE509A}.Release|x86.Build.0 = Release|x86 - {22071333-15BA-4D16-A1D5-4D5B1A83FBDD}.Debug|Any CPU.ActiveCfg = Debug|x86 - {22071333-15BA-4D16-A1D5-4D5B1A83FBDD}.Debug|Any CPU.Build.0 = Debug|x86 - {22071333-15BA-4D16-A1D5-4D5B1A83FBDD}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {22071333-15BA-4D16-A1D5-4D5B1A83FBDD}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {22071333-15BA-4D16-A1D5-4D5B1A83FBDD}.Debug|x86.ActiveCfg = Debug|x86 - {22071333-15BA-4D16-A1D5-4D5B1A83FBDD}.Debug|x86.Build.0 = Debug|x86 - {22071333-15BA-4D16-A1D5-4D5B1A83FBDD}.Release|Any CPU.ActiveCfg = Release|x86 - {22071333-15BA-4D16-A1D5-4D5B1A83FBDD}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {22071333-15BA-4D16-A1D5-4D5B1A83FBDD}.Release|Mixed Platforms.Build.0 = Release|x86 - {22071333-15BA-4D16-A1D5-4D5B1A83FBDD}.Release|x86.ActiveCfg = Release|x86 - {22071333-15BA-4D16-A1D5-4D5B1A83FBDD}.Release|x86.Build.0 = Release|x86 - {D9128247-8F97-48B8-A863-F1F21A029FCE}.Debug|Any CPU.ActiveCfg = Debug|x86 - {D9128247-8F97-48B8-A863-F1F21A029FCE}.Debug|Any CPU.Build.0 = Debug|x86 - {D9128247-8F97-48B8-A863-F1F21A029FCE}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {D9128247-8F97-48B8-A863-F1F21A029FCE}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {D9128247-8F97-48B8-A863-F1F21A029FCE}.Debug|x86.ActiveCfg = Debug|x86 - {D9128247-8F97-48B8-A863-F1F21A029FCE}.Debug|x86.Build.0 = Debug|x86 - {D9128247-8F97-48B8-A863-F1F21A029FCE}.Release|Any CPU.ActiveCfg = Release|x86 - {D9128247-8F97-48B8-A863-F1F21A029FCE}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {D9128247-8F97-48B8-A863-F1F21A029FCE}.Release|Mixed Platforms.Build.0 = Release|x86 - {D9128247-8F97-48B8-A863-F1F21A029FCE}.Release|x86.ActiveCfg = Release|x86 - {D9128247-8F97-48B8-A863-F1F21A029FCE}.Release|x86.Build.0 = Release|x86 - {32A4C918-30EE-41DB-8E26-8A3BB88ED231}.Debug|Any CPU.ActiveCfg = Debug|x86 - {32A4C918-30EE-41DB-8E26-8A3BB88ED231}.Debug|Any CPU.Build.0 = Debug|x86 - {32A4C918-30EE-41DB-8E26-8A3BB88ED231}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {32A4C918-30EE-41DB-8E26-8A3BB88ED231}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {32A4C918-30EE-41DB-8E26-8A3BB88ED231}.Debug|x86.ActiveCfg = Debug|x86 - {32A4C918-30EE-41DB-8E26-8A3BB88ED231}.Debug|x86.Build.0 = Debug|x86 - {32A4C918-30EE-41DB-8E26-8A3BB88ED231}.Release|Any CPU.ActiveCfg = Release|x86 - {32A4C918-30EE-41DB-8E26-8A3BB88ED231}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {32A4C918-30EE-41DB-8E26-8A3BB88ED231}.Release|Mixed Platforms.Build.0 = Release|x86 - {32A4C918-30EE-41DB-8E26-8A3BB88ED231}.Release|x86.ActiveCfg = Release|x86 - {32A4C918-30EE-41DB-8E26-8A3BB88ED231}.Release|x86.Build.0 = Release|x86 - {AA99AF26-F7B1-4A6B-A922-5C25539F6391}.Debug|Any CPU.ActiveCfg = Debug|x86 - {AA99AF26-F7B1-4A6B-A922-5C25539F6391}.Debug|Any CPU.Build.0 = Debug|x86 - {AA99AF26-F7B1-4A6B-A922-5C25539F6391}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {AA99AF26-F7B1-4A6B-A922-5C25539F6391}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {AA99AF26-F7B1-4A6B-A922-5C25539F6391}.Debug|x86.ActiveCfg = Debug|x86 - {AA99AF26-F7B1-4A6B-A922-5C25539F6391}.Debug|x86.Build.0 = Debug|x86 - {AA99AF26-F7B1-4A6B-A922-5C25539F6391}.Release|Any CPU.ActiveCfg = Release|x86 - {AA99AF26-F7B1-4A6B-A922-5C25539F6391}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {AA99AF26-F7B1-4A6B-A922-5C25539F6391}.Release|Mixed Platforms.Build.0 = Release|x86 - {AA99AF26-F7B1-4A6B-A922-5C25539F6391}.Release|x86.ActiveCfg = Release|x86 - {AA99AF26-F7B1-4A6B-A922-5C25539F6391}.Release|x86.Build.0 = Release|x86 - {C5D2BAE1-E182-48A0-AA74-1AF14B782BF7}.Debug|Any CPU.ActiveCfg = Debug|x86 - {C5D2BAE1-E182-48A0-AA74-1AF14B782BF7}.Debug|Any CPU.Build.0 = Debug|x86 - {C5D2BAE1-E182-48A0-AA74-1AF14B782BF7}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {C5D2BAE1-E182-48A0-AA74-1AF14B782BF7}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {C5D2BAE1-E182-48A0-AA74-1AF14B782BF7}.Debug|x86.ActiveCfg = Debug|x86 - {C5D2BAE1-E182-48A0-AA74-1AF14B782BF7}.Debug|x86.Build.0 = Debug|x86 - {C5D2BAE1-E182-48A0-AA74-1AF14B782BF7}.Release|Any CPU.ActiveCfg = Release|x86 - {C5D2BAE1-E182-48A0-AA74-1AF14B782BF7}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {C5D2BAE1-E182-48A0-AA74-1AF14B782BF7}.Release|Mixed Platforms.Build.0 = Release|x86 - {C5D2BAE1-E182-48A0-AA74-1AF14B782BF7}.Release|x86.ActiveCfg = Release|x86 - {C5D2BAE1-E182-48A0-AA74-1AF14B782BF7}.Release|x86.Build.0 = Release|x86 - {F16692B8-9F38-4DCA-A582-E43172B989C6}.Debug|Any CPU.ActiveCfg = Debug|x86 - {F16692B8-9F38-4DCA-A582-E43172B989C6}.Debug|Any CPU.Build.0 = Debug|x86 - {F16692B8-9F38-4DCA-A582-E43172B989C6}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {F16692B8-9F38-4DCA-A582-E43172B989C6}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {F16692B8-9F38-4DCA-A582-E43172B989C6}.Debug|x86.ActiveCfg = Debug|x86 - {F16692B8-9F38-4DCA-A582-E43172B989C6}.Debug|x86.Build.0 = Debug|x86 - {F16692B8-9F38-4DCA-A582-E43172B989C6}.Release|Any CPU.ActiveCfg = Release|x86 - {F16692B8-9F38-4DCA-A582-E43172B989C6}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {F16692B8-9F38-4DCA-A582-E43172B989C6}.Release|Mixed Platforms.Build.0 = Release|x86 - {F16692B8-9F38-4DCA-A582-E43172B989C6}.Release|x86.ActiveCfg = Release|x86 - {F16692B8-9F38-4DCA-A582-E43172B989C6}.Release|x86.Build.0 = Release|x86 - {59BED991-F207-48ED-B24C-0A1D9C986C01}.Debug|Any CPU.ActiveCfg = Debug|x86 - {59BED991-F207-48ED-B24C-0A1D9C986C01}.Debug|Any CPU.Build.0 = Debug|x86 - {59BED991-F207-48ED-B24C-0A1D9C986C01}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {59BED991-F207-48ED-B24C-0A1D9C986C01}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {59BED991-F207-48ED-B24C-0A1D9C986C01}.Debug|x86.ActiveCfg = Debug|x86 - {59BED991-F207-48ED-B24C-0A1D9C986C01}.Debug|x86.Build.0 = Debug|x86 - {59BED991-F207-48ED-B24C-0A1D9C986C01}.Release|Any CPU.ActiveCfg = Release|x86 - {59BED991-F207-48ED-B24C-0A1D9C986C01}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {59BED991-F207-48ED-B24C-0A1D9C986C01}.Release|Mixed Platforms.Build.0 = Release|x86 - {59BED991-F207-48ED-B24C-0A1D9C986C01}.Release|x86.ActiveCfg = Release|x86 - {59BED991-F207-48ED-B24C-0A1D9C986C01}.Release|x86.Build.0 = Release|x86 - {16219571-3268-4D12-8689-12B7163DBA13}.Debug|Any CPU.ActiveCfg = Debug|x86 - {16219571-3268-4D12-8689-12B7163DBA13}.Debug|Any CPU.Build.0 = Debug|x86 - {16219571-3268-4D12-8689-12B7163DBA13}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {16219571-3268-4D12-8689-12B7163DBA13}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {16219571-3268-4D12-8689-12B7163DBA13}.Debug|x86.ActiveCfg = Debug|x86 - {16219571-3268-4D12-8689-12B7163DBA13}.Debug|x86.Build.0 = Debug|x86 - {16219571-3268-4D12-8689-12B7163DBA13}.Release|Any CPU.ActiveCfg = Release|x86 - {16219571-3268-4D12-8689-12B7163DBA13}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {16219571-3268-4D12-8689-12B7163DBA13}.Release|Mixed Platforms.Build.0 = Release|x86 - {16219571-3268-4D12-8689-12B7163DBA13}.Release|x86.ActiveCfg = Release|x86 - {16219571-3268-4D12-8689-12B7163DBA13}.Release|x86.Build.0 = Release|x86 + {BCF0F967-8753-4438-BD07-AADCA9CE509A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BCF0F967-8753-4438-BD07-AADCA9CE509A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BCF0F967-8753-4438-BD07-AADCA9CE509A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {BCF0F967-8753-4438-BD07-AADCA9CE509A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {BCF0F967-8753-4438-BD07-AADCA9CE509A}.Debug|x86.ActiveCfg = Debug|Any CPU + {BCF0F967-8753-4438-BD07-AADCA9CE509A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BCF0F967-8753-4438-BD07-AADCA9CE509A}.Release|Any CPU.Build.0 = Release|Any CPU + {BCF0F967-8753-4438-BD07-AADCA9CE509A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {BCF0F967-8753-4438-BD07-AADCA9CE509A}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {BCF0F967-8753-4438-BD07-AADCA9CE509A}.Release|x86.ActiveCfg = Release|Any CPU + {22071333-15BA-4D16-A1D5-4D5B1A83FBDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {22071333-15BA-4D16-A1D5-4D5B1A83FBDD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {22071333-15BA-4D16-A1D5-4D5B1A83FBDD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {22071333-15BA-4D16-A1D5-4D5B1A83FBDD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {22071333-15BA-4D16-A1D5-4D5B1A83FBDD}.Debug|x86.ActiveCfg = Debug|Any CPU + {22071333-15BA-4D16-A1D5-4D5B1A83FBDD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {22071333-15BA-4D16-A1D5-4D5B1A83FBDD}.Release|Any CPU.Build.0 = Release|Any CPU + {22071333-15BA-4D16-A1D5-4D5B1A83FBDD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {22071333-15BA-4D16-A1D5-4D5B1A83FBDD}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {22071333-15BA-4D16-A1D5-4D5B1A83FBDD}.Release|x86.ActiveCfg = Release|Any CPU + {D9128247-8F97-48B8-A863-F1F21A029FCE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D9128247-8F97-48B8-A863-F1F21A029FCE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D9128247-8F97-48B8-A863-F1F21A029FCE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {D9128247-8F97-48B8-A863-F1F21A029FCE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {D9128247-8F97-48B8-A863-F1F21A029FCE}.Debug|x86.ActiveCfg = Debug|Any CPU + {D9128247-8F97-48B8-A863-F1F21A029FCE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D9128247-8F97-48B8-A863-F1F21A029FCE}.Release|Any CPU.Build.0 = Release|Any CPU + {D9128247-8F97-48B8-A863-F1F21A029FCE}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {D9128247-8F97-48B8-A863-F1F21A029FCE}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {D9128247-8F97-48B8-A863-F1F21A029FCE}.Release|x86.ActiveCfg = Release|Any CPU + {32A4C918-30EE-41DB-8E26-8A3BB88ED231}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {32A4C918-30EE-41DB-8E26-8A3BB88ED231}.Debug|Any CPU.Build.0 = Debug|Any CPU + {32A4C918-30EE-41DB-8E26-8A3BB88ED231}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {32A4C918-30EE-41DB-8E26-8A3BB88ED231}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {32A4C918-30EE-41DB-8E26-8A3BB88ED231}.Debug|x86.ActiveCfg = Debug|Any CPU + {32A4C918-30EE-41DB-8E26-8A3BB88ED231}.Release|Any CPU.ActiveCfg = Release|Any CPU + {32A4C918-30EE-41DB-8E26-8A3BB88ED231}.Release|Any CPU.Build.0 = Release|Any CPU + {32A4C918-30EE-41DB-8E26-8A3BB88ED231}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {32A4C918-30EE-41DB-8E26-8A3BB88ED231}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {32A4C918-30EE-41DB-8E26-8A3BB88ED231}.Release|x86.ActiveCfg = Release|Any CPU + {AA99AF26-F7B1-4A6B-A922-5C25539F6391}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AA99AF26-F7B1-4A6B-A922-5C25539F6391}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AA99AF26-F7B1-4A6B-A922-5C25539F6391}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {AA99AF26-F7B1-4A6B-A922-5C25539F6391}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {AA99AF26-F7B1-4A6B-A922-5C25539F6391}.Debug|x86.ActiveCfg = Debug|Any CPU + {AA99AF26-F7B1-4A6B-A922-5C25539F6391}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AA99AF26-F7B1-4A6B-A922-5C25539F6391}.Release|Any CPU.Build.0 = Release|Any CPU + {AA99AF26-F7B1-4A6B-A922-5C25539F6391}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {AA99AF26-F7B1-4A6B-A922-5C25539F6391}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {AA99AF26-F7B1-4A6B-A922-5C25539F6391}.Release|x86.ActiveCfg = Release|Any CPU + {C5D2BAE1-E182-48A0-AA74-1AF14B782BF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C5D2BAE1-E182-48A0-AA74-1AF14B782BF7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C5D2BAE1-E182-48A0-AA74-1AF14B782BF7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {C5D2BAE1-E182-48A0-AA74-1AF14B782BF7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {C5D2BAE1-E182-48A0-AA74-1AF14B782BF7}.Debug|x86.ActiveCfg = Debug|Any CPU + {C5D2BAE1-E182-48A0-AA74-1AF14B782BF7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C5D2BAE1-E182-48A0-AA74-1AF14B782BF7}.Release|Any CPU.Build.0 = Release|Any CPU + {C5D2BAE1-E182-48A0-AA74-1AF14B782BF7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {C5D2BAE1-E182-48A0-AA74-1AF14B782BF7}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {C5D2BAE1-E182-48A0-AA74-1AF14B782BF7}.Release|x86.ActiveCfg = Release|Any CPU + {F16692B8-9F38-4DCA-A582-E43172B989C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F16692B8-9F38-4DCA-A582-E43172B989C6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F16692B8-9F38-4DCA-A582-E43172B989C6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {F16692B8-9F38-4DCA-A582-E43172B989C6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {F16692B8-9F38-4DCA-A582-E43172B989C6}.Debug|x86.ActiveCfg = Debug|Any CPU + {F16692B8-9F38-4DCA-A582-E43172B989C6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F16692B8-9F38-4DCA-A582-E43172B989C6}.Release|Any CPU.Build.0 = Release|Any CPU + {F16692B8-9F38-4DCA-A582-E43172B989C6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {F16692B8-9F38-4DCA-A582-E43172B989C6}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {F16692B8-9F38-4DCA-A582-E43172B989C6}.Release|x86.ActiveCfg = Release|Any CPU + {59BED991-F207-48ED-B24C-0A1D9C986C01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {59BED991-F207-48ED-B24C-0A1D9C986C01}.Debug|Any CPU.Build.0 = Debug|Any CPU + {59BED991-F207-48ED-B24C-0A1D9C986C01}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {59BED991-F207-48ED-B24C-0A1D9C986C01}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {59BED991-F207-48ED-B24C-0A1D9C986C01}.Debug|x86.ActiveCfg = Debug|Any CPU + {59BED991-F207-48ED-B24C-0A1D9C986C01}.Release|Any CPU.ActiveCfg = Release|Any CPU + {59BED991-F207-48ED-B24C-0A1D9C986C01}.Release|Any CPU.Build.0 = Release|Any CPU + {59BED991-F207-48ED-B24C-0A1D9C986C01}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {59BED991-F207-48ED-B24C-0A1D9C986C01}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {59BED991-F207-48ED-B24C-0A1D9C986C01}.Release|x86.ActiveCfg = Release|Any CPU + {16219571-3268-4D12-8689-12B7163DBA13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {16219571-3268-4D12-8689-12B7163DBA13}.Debug|Any CPU.Build.0 = Debug|Any CPU + {16219571-3268-4D12-8689-12B7163DBA13}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {16219571-3268-4D12-8689-12B7163DBA13}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {16219571-3268-4D12-8689-12B7163DBA13}.Debug|x86.ActiveCfg = Debug|Any CPU + {16219571-3268-4D12-8689-12B7163DBA13}.Release|Any CPU.ActiveCfg = Release|Any CPU + {16219571-3268-4D12-8689-12B7163DBA13}.Release|Any CPU.Build.0 = Release|Any CPU + {16219571-3268-4D12-8689-12B7163DBA13}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {16219571-3268-4D12-8689-12B7163DBA13}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {16219571-3268-4D12-8689-12B7163DBA13}.Release|x86.ActiveCfg = Release|Any CPU + {CCC4363E-81E2-4058-94DD-00494E9E992A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CCC4363E-81E2-4058-94DD-00494E9E992A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CCC4363E-81E2-4058-94DD-00494E9E992A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {CCC4363E-81E2-4058-94DD-00494E9E992A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {CCC4363E-81E2-4058-94DD-00494E9E992A}.Debug|x86.ActiveCfg = Debug|Any CPU + {CCC4363E-81E2-4058-94DD-00494E9E992A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CCC4363E-81E2-4058-94DD-00494E9E992A}.Release|Any CPU.Build.0 = Release|Any CPU + {CCC4363E-81E2-4058-94DD-00494E9E992A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {CCC4363E-81E2-4058-94DD-00494E9E992A}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {CCC4363E-81E2-4058-94DD-00494E9E992A}.Release|x86.ActiveCfg = Release|Any CPU + {AE25EF21-7F91-4B86-B73E-AF746821D339}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AE25EF21-7F91-4B86-B73E-AF746821D339}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AE25EF21-7F91-4B86-B73E-AF746821D339}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {AE25EF21-7F91-4B86-B73E-AF746821D339}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {AE25EF21-7F91-4B86-B73E-AF746821D339}.Debug|x86.ActiveCfg = Debug|Any CPU + {AE25EF21-7F91-4B86-B73E-AF746821D339}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AE25EF21-7F91-4B86-B73E-AF746821D339}.Release|Any CPU.Build.0 = Release|Any CPU + {AE25EF21-7F91-4B86-B73E-AF746821D339}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {AE25EF21-7F91-4B86-B73E-AF746821D339}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {AE25EF21-7F91-4B86-B73E-AF746821D339}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -148,5 +163,7 @@ Global {F16692B8-9F38-4DCA-A582-E43172B989C6} = {F31FF137-390C-49BF-A3BD-7C6ED3597C21} {59BED991-F207-48ED-B24C-0A1D9C986C01} = {A5A15F1C-885A-452A-A731-B0173DDBD913} {16219571-3268-4D12-8689-12B7163DBA13} = {F31FF137-390C-49BF-A3BD-7C6ED3597C21} + {CCC4363E-81E2-4058-94DD-00494E9E992A} = {A5A15F1C-885A-452A-A731-B0173DDBD913} + {AE25EF21-7F91-4B86-B73E-AF746821D339} = {F31FF137-390C-49BF-A3BD-7C6ED3597C21} EndGlobalSection EndGlobal diff --git a/src/Microsoft.AspNet.Http.Extensions/HttpResponseSendingExtensions.cs b/src/Microsoft.AspNet.Http.Extensions/HttpResponseSendingExtensions.cs new file mode 100644 index 0000000000..b97da7c13b --- /dev/null +++ b/src/Microsoft.AspNet.Http.Extensions/HttpResponseSendingExtensions.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace Microsoft.AspNet.Http +{ + /// + /// Convenience methods for writing to the response. + /// + public static class HttpResponseSendingExtensions + { + /// + /// Sends a response with the given Content-Type and body. UTF-8 encoding will be used, and the Content-Length header will be set accordingly. + /// + /// + /// + /// + /// + /// + public static Task SendAsync([NotNull] this HttpResponse response, [NotNull] string text, [NotNull] string contentType, CancellationToken cancellationToken = default(CancellationToken)) + { + return response.SendAsync(text, Encoding.UTF8, contentType, cancellationToken); + } + + /// + /// Sends a response with the given Content-Type, encoding, and body. The Content-Length header will be set accordingly. + /// + /// + /// + /// + /// + /// + /// + public static Task SendAsync([NotNull] this HttpResponse response, [NotNull] string text, [NotNull] Encoding encoding, [NotNull] string contentType, CancellationToken cancellationToken = default(CancellationToken)) + { + if (string.IsNullOrEmpty(contentType)) + { + throw new ArgumentException("Empty Content-Type is not allowed."); + } + if (contentType.IndexOf("charset=", StringComparison.OrdinalIgnoreCase) < 0) + { + contentType += "; charset=" + encoding.WebName; + } + response.ContentType = contentType; + return response.SendAsync(text, encoding, cancellationToken); + } + + /// + /// Sends a response with the given body. UTF-8 encoding will be used, and the Content-Length header will be set accordingly. + /// + /// + /// + /// + /// + public static Task SendAsync([NotNull] this HttpResponse response, [NotNull] string text, CancellationToken cancellationToken = default(CancellationToken)) + { + return response.SendAsync(text, Encoding.UTF8, cancellationToken); + } + + /// + /// Sends a response with the given encoding and body. The Content-Length header will be set accordingly. + /// + /// + /// + /// + /// + /// + public static Task SendAsync([NotNull] this HttpResponse response, [NotNull] string text, [NotNull] Encoding encoding, CancellationToken cancellationToken = default(CancellationToken)) + { + byte[] data = encoding.GetBytes(text); + return response.SendAsync(data, cancellationToken); + } + + /// + /// Sends a response with the given Content-Type and body. The Content-Length header will be set accordingly. + /// + /// + /// + /// + /// + /// + public static Task SendAsync([NotNull] this HttpResponse response, [NotNull] byte[] data, [NotNull] string contentType, CancellationToken cancellationToken = default(CancellationToken)) + { + return response.SendAsync(new ArraySegment(data), contentType, cancellationToken); + } + + /// + /// Sends a response with the given Content-Type and body. The Content-Length header will be set accordingly. + /// + /// + /// + /// + /// + /// + public static Task SendAsync([NotNull] this HttpResponse response, ArraySegment data, [NotNull] string contentType, CancellationToken cancellationToken = default(CancellationToken)) + { + if (string.IsNullOrEmpty(contentType)) + { + throw new ArgumentException("Empty Content-Type is not allowed."); + } + response.ContentType = contentType; + return response.SendAsync(data, cancellationToken); + } + + /// + /// Sends a response with the given body. The Content-Length header will be set accordingly. + /// + /// + /// + /// + /// + public static Task SendAsync([NotNull] this HttpResponse response, [NotNull] byte[] data, CancellationToken cancellationToken = default(CancellationToken)) + { + return response.SendAsync(new ArraySegment(data), cancellationToken); + } + + /// + /// Sends a response with the given body. The Content-Length header will be set accordingly. + /// + /// + /// + /// + /// + /// + /// + public static Task SendAsync([NotNull] this HttpResponse response, [NotNull] byte[] data, int offset, int count, CancellationToken cancellationToken = default(CancellationToken)) + { + return response.SendAsync(new ArraySegment(data, offset, count), cancellationToken); + } + + /// + /// Sends a response with the given body. The Content-Length header will be set accordingly. + /// + /// + /// + /// + /// + public static Task SendAsync([NotNull] this HttpResponse response, ArraySegment data, CancellationToken cancellationToken = default(CancellationToken)) + { + if (data.Array == null) + { + throw new ArgumentException("The Array cannot be null.", "data"); // TODO: LOC + } + response.ContentLength = data.Count; + return response.Body.WriteAsync(data.Array, data.Offset, data.Count, cancellationToken); + } + } +} \ No newline at end of file diff --git a/src/Microsoft.AspNet.Http.Extensions/Microsoft.AspNet.Http.Extensions.kproj b/src/Microsoft.AspNet.Http.Extensions/Microsoft.AspNet.Http.Extensions.kproj new file mode 100644 index 0000000000..7ca2e89f22 --- /dev/null +++ b/src/Microsoft.AspNet.Http.Extensions/Microsoft.AspNet.Http.Extensions.kproj @@ -0,0 +1,36 @@ + + + + 12.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + Debug + AnyCPU + + + + ccc4363e-81e2-4058-94dd-00494e9e992a + Library + Microsoft.AspNet.Http.Extensions + + + ConsoleDebugger + + + WebDebugger + + + + + 2.0 + + + + + + + + + + \ No newline at end of file diff --git a/src/Microsoft.AspNet.Http.Extensions/NotNullAttribute.cs b/src/Microsoft.AspNet.Http.Extensions/NotNullAttribute.cs new file mode 100644 index 0000000000..d43b93e4e4 --- /dev/null +++ b/src/Microsoft.AspNet.Http.Extensions/NotNullAttribute.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; + +namespace Microsoft.AspNet.Http +{ + [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false)] + internal sealed class NotNullAttribute : Attribute + { + } +} \ No newline at end of file diff --git a/src/Microsoft.AspNet.Http.Extensions/project.json b/src/Microsoft.AspNet.Http.Extensions/project.json new file mode 100644 index 0000000000..6faa246274 --- /dev/null +++ b/src/Microsoft.AspNet.Http.Extensions/project.json @@ -0,0 +1,15 @@ +{ + "version": "1.0.0-*", + "dependencies": { + "Microsoft.AspNet.Http": "" + }, + "configurations" : { + "net45" : { + }, + "k10" : { + "dependencies": { + "System.Runtime": "4.0.20.0" + } + } + } +} diff --git a/src/Microsoft.AspNet.Http/HttpResponse.cs b/src/Microsoft.AspNet.Http/HttpResponse.cs index 05ae0942d3..a404c17c94 100644 --- a/src/Microsoft.AspNet.Http/HttpResponse.cs +++ b/src/Microsoft.AspNet.Http/HttpResponse.cs @@ -33,8 +33,6 @@ namespace Microsoft.AspNet.Http public abstract void Redirect(string location, bool permanent); - public abstract Task WriteAsync(string data); - public virtual void Challenge() { Challenge(new string[0]); diff --git a/src/Microsoft.AspNet.Http/HttpResponseWritingExtensions.cs b/src/Microsoft.AspNet.Http/HttpResponseWritingExtensions.cs new file mode 100644 index 0000000000..464513f895 --- /dev/null +++ b/src/Microsoft.AspNet.Http/HttpResponseWritingExtensions.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace Microsoft.AspNet.Http +{ + /// + /// Convenience methods for writing to the response. + /// + public static class HttpResponseWritingExtensions + { + /// + /// Writes the given text to the response body. UTF-8 encoding will be used. + /// + /// + /// + /// + /// + public static Task WriteAsync([NotNull] this HttpResponse response, [NotNull] string text, CancellationToken cancellationToken = default(CancellationToken)) + { + return response.WriteAsync(text, Encoding.UTF8, cancellationToken); + } + + /// + /// Writes the given text to the response body using the given encoding. + /// + /// + /// + /// + /// + /// + public static Task WriteAsync([NotNull] this HttpResponse response, [NotNull] string text, [NotNull] Encoding encoding, CancellationToken cancellationToken = default(CancellationToken)) + { + byte[] data = encoding.GetBytes(text); + return response.Body.WriteAsync(data, 0, data.Length, cancellationToken); + } + } +} \ No newline at end of file diff --git a/src/Microsoft.AspNet.Http/Microsoft.AspNet.Http.kproj b/src/Microsoft.AspNet.Http/Microsoft.AspNet.Http.kproj index a93ecf8e2a..0e326800f8 100644 --- a/src/Microsoft.AspNet.Http/Microsoft.AspNet.Http.kproj +++ b/src/Microsoft.AspNet.Http/Microsoft.AspNet.Http.kproj @@ -33,6 +33,7 @@ + @@ -48,4 +49,4 @@ - + \ No newline at end of file diff --git a/src/Microsoft.AspNet.PipelineCore/DefaultHttpResponse.cs b/src/Microsoft.AspNet.PipelineCore/DefaultHttpResponse.cs index 3a0b19cab0..5af0f9b5fe 100644 --- a/src/Microsoft.AspNet.PipelineCore/DefaultHttpResponse.cs +++ b/src/Microsoft.AspNet.PipelineCore/DefaultHttpResponse.cs @@ -124,12 +124,6 @@ namespace Microsoft.AspNet.PipelineCore Headers.Set(Constants.Headers.Location, location); } - public override Task WriteAsync(string data) - { - var bytes = Encoding.UTF8.GetBytes(data); - return Body.WriteAsync(bytes, 0, bytes.Length); - } - public override void Challenge(IEnumerable authenticationTypes, AuthenticationProperties properties) { if (authenticationTypes == null) diff --git a/test/Microsoft.AspNet.Http.Extensions.Tests/HttpResponseSendingExtensionsTests.cs b/test/Microsoft.AspNet.Http.Extensions.Tests/HttpResponseSendingExtensionsTests.cs new file mode 100644 index 0000000000..d2e51ec219 --- /dev/null +++ b/test/Microsoft.AspNet.Http.Extensions.Tests/HttpResponseSendingExtensionsTests.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Text; +using System.Threading.Tasks; +using Microsoft.AspNet.Builder.Extensions; +using Microsoft.AspNet.HttpFeature; +using Microsoft.AspNet.PipelineCore; +using Xunit; + +namespace Microsoft.AspNet.Http.Extensions +{ + public class HttpResponseSendingExtensionsTests + { + [Fact] + public async Task SendData_SendBytes() + { + HttpContext context = CreateRequest(); + await context.Response.SendAsync(new byte[10]); + + Assert.Equal(10, context.Response.Body.Length); + Assert.Equal(10, context.Response.ContentLength); + Assert.Null(context.Response.ContentType); + } + + [Fact] + public async Task SendData_SendBytesAndContentType() + { + HttpContext context = CreateRequest(); + await context.Response.SendAsync(new byte[10], "text/html"); + + Assert.Equal(10, context.Response.Body.Length); + Assert.Equal(10, context.Response.ContentLength); + Assert.Equal("text/html", context.Response.ContentType); + } + + [Fact] + public async Task SendData_SendText() + { + HttpContext context = CreateRequest(); + await context.Response.SendAsync("Hello World"); + + Assert.Equal(11, context.Response.Body.Length); + Assert.Equal(11, context.Response.ContentLength); + Assert.Null(context.Response.ContentType); + } + + [Fact] + public async Task SendData_SendTextWithContentType() + { + HttpContext context = CreateRequest(); + await context.Response.SendAsync("Hello World", "text/html"); + + Assert.Equal(11, context.Response.Body.Length); + Assert.Equal(11, context.Response.ContentLength); + Assert.Equal("text/html; charset=utf-8", context.Response.ContentType); + } + + [Fact] + public async Task SendData_SendTextWithEncoding() + { + HttpContext context = CreateRequest(); + await context.Response.SendAsync("Hello World", Encoding.UTF32); + + Assert.Equal(44, context.Response.Body.Length); + Assert.Equal(44, context.Response.ContentLength); + Assert.Null(context.Response.ContentType); + } + + [Fact] + public async Task SendData_SendTextWithContentTypeAndEncoding() + { + HttpContext context = CreateRequest(); + await context.Response.SendAsync("Hello World", Encoding.UTF32, "text/html"); + + Assert.Equal(44, context.Response.Body.Length); + Assert.Equal(44, context.Response.ContentLength); + Assert.Equal("text/html; charset=utf-32", context.Response.ContentType); + } + + private HttpContext CreateRequest() + { + HttpContext context = new DefaultHttpContext(); + return context; + } + } +} diff --git a/test/Microsoft.AspNet.Http.Extensions.Tests/Microsoft.AspNet.Http.Extensions.Tests.kproj b/test/Microsoft.AspNet.Http.Extensions.Tests/Microsoft.AspNet.Http.Extensions.Tests.kproj new file mode 100644 index 0000000000..6223e75396 --- /dev/null +++ b/test/Microsoft.AspNet.Http.Extensions.Tests/Microsoft.AspNet.Http.Extensions.Tests.kproj @@ -0,0 +1,35 @@ + + + + 12.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + Debug + AnyCPU + + + + ae25ef21-7f91-4b86-b73e-af746821d339 + Library + Microsoft.AspNet.Http.Extensions.Tests + + + ConsoleDebugger + + + WebDebugger + + + + + 2.0 + + + + + + + + + \ No newline at end of file diff --git a/test/Microsoft.AspNet.Http.Extensions.Tests/project.json b/test/Microsoft.AspNet.Http.Extensions.Tests/project.json new file mode 100644 index 0000000000..701d09c188 --- /dev/null +++ b/test/Microsoft.AspNet.Http.Extensions.Tests/project.json @@ -0,0 +1,20 @@ +{ + "dependencies": { + "Microsoft.AspNet.Http": "", + "Microsoft.AspNet.Http.Extensions": "", + "Microsoft.AspNet.HttpFeature": "", + "Microsoft.AspNet.PipelineCore": "", + "Xunit.KRunner": "1.0.0-*" + }, + "commands": { + "test": "Xunit.KRunner" + }, + "configurations": { + "net45": { + "dependencies": { + "Shouldly": "1.1.1.1", + "System.Runtime": "" + } + } + } +} \ No newline at end of file diff --git a/test/Microsoft.AspNet.Http.Tests/HttpResponseWritingExtensionsTests.cs b/test/Microsoft.AspNet.Http.Tests/HttpResponseWritingExtensionsTests.cs new file mode 100644 index 0000000000..e34518ea26 --- /dev/null +++ b/test/Microsoft.AspNet.Http.Tests/HttpResponseWritingExtensionsTests.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Threading.Tasks; +using Microsoft.AspNet.Builder.Extensions; +using Microsoft.AspNet.HttpFeature; +using Microsoft.AspNet.PipelineCore; +using Xunit; + +namespace Microsoft.AspNet.Http +{ + public class HttpResponseWritingExtensionsTests + { + [Fact] + public async Task WritingText_WriteText() + { + HttpContext context = CreateRequest(); + await context.Response.WriteAsync("Hello World"); + + Assert.Equal(11, context.Response.Body.Length); + } + + [Fact] + public async Task WritingText_MultipleWrites() + { + HttpContext context = CreateRequest(); + await context.Response.WriteAsync("Hello World"); + await context.Response.WriteAsync("Hello World"); + + Assert.Equal(22, context.Response.Body.Length); + } + + private HttpContext CreateRequest() + { + HttpContext context = new DefaultHttpContext(); + return context; + } + } +} diff --git a/test/Microsoft.AspNet.Http.Tests/Microsoft.AspNet.Http.Tests.kproj b/test/Microsoft.AspNet.Http.Tests/Microsoft.AspNet.Http.Tests.kproj index f8e3963d7c..754a812c15 100644 --- a/test/Microsoft.AspNet.Http.Tests/Microsoft.AspNet.Http.Tests.kproj +++ b/test/Microsoft.AspNet.Http.Tests/Microsoft.AspNet.Http.Tests.kproj @@ -21,6 +21,7 @@ +