Граф коммитов

1777 Коммитов

Автор SHA1 Сообщение Дата
William Godbe 1231b77d79
Prepare for 5.3.0-preview1 (#401)
* Prepare for 5.3.0-preview1

* Update AssemblyVersions for formatting
2023-03-16 12:56:48 -07:00
Doug Bunting 2da072a141
Use `msbuild` from VS 2022 if available (#395)
* Use `msbuild` from VS 2022 if available
  - should ease local and TeamCity builds
  - make `%InstallDir%` unquoted (unlike `%vswhere%`)
    - shorten `%Path%` slightly
  - nits:
    - use script location more; no need to change directories

* React to new build issues
  - follow up to #396
    (unsure why new FxCop and "spelling" errors didn't fail that PR)

* Put `PortReserver` users into an xUnit collection
2023-03-06 22:07:37 -08:00
Doug Bunting 6451d777f7
Throw `PlatformNotSupportedException` in `netstandard1.3` (#396)
- stop trying to use DCS in the JSON and XML formatters
- if `UseDataContractSerializer` or `!UseXmlSerializer`:
  - `CanReadType(...)` and `CanWriteType(...)` always return `false`
  - `ReadFromStreamAsync(...)` and `WriteToStreamAsync(...)` always `throw`
- change default XML formatter configuration to use `XmlSerializer`
- adjust and disable tests in reaction
- add tests of new `netstandard1.3` behavior
- nits:
  - correct namespace of `SerializerConsistencyTests`; was alone in previous namespace
  - s/DataContractFormatter/XmlSerializerFormatter/ to reflect actual `XmlMediaTypeFormatter` test actions
2023-03-06 17:26:11 -08:00
Doug Bunting cb7628ff70
Support `DBNull` in `netstandard1.3` assembly (#394)
* Support `DBNull` in `netstandard1.3` assembly
- available from the System.Data.Common package
- extend `DBNull` testing to include `net6.0`
  - s/NETCOREAPP/NETCOREAPP2_1/ where possible
- fix comments in `HttpValueCollectionTest`
  - comments about `DBNull` there were incorrect

* !fixup! Add `$(System.JobId)` to artifact names
- `publish` / `PublishPipelineArtifact@1` task doesn't overwrite an existing build artifact
  - bit different from `PublishBuildArtifacts@1`
- follow guidance at <https://learn.microsoft.com/en-us/azure/devops/pipelines/artifacts/pipeline-artifacts?view=azure-devops&tabs=yaml-task#q-can-i-delete-pipeline-artifacts-when-re-running-failed-jobs>
2023-03-01 16:53:44 -08:00
Doug Bunting d56a97f593
Rename Formatting projects and more (#392)
* Rename `netstandard` Formatting projects
  - Formatting.NetCore and Formatting.NetStandard names no longer make sense

* Adjust `netstandard` Formatting output paths
  - align w/ new project names

* Use `NETSTANDARD1_3` and `Testing_NetStandard1_3`
  - `NETFX_CORE` name no longer makes much sense
  - remove both `NETFX_CORE` C# defined constant and `msbuild` property
    - manually-defined constant completely unnecessary in src/ code

* Remove RuntimePortable.sln
  - solution name no longer makes much sense and division adds little or no value
  - add .NET Standard projects to Runtime.sln
  - add solution filters for .NET Framework and .NET Standard projects
  - remove `$(BuildPortable)` property and `@(SolutionsToBuild)` item group
2023-02-28 11:52:52 -08:00
Doug Bunting eae75d6044
Correct `ValidateStreamForReading(...)` (#390)
- fix #389
- check `Stream` before first read attempt
- check `CanRead` (not `CanSeek`) before second or later read attempts
- add lots of tests of related scenarios
- nit: correct a recent `HttpContentMessageExtensions` comment

Apply suggestions from code review
- specifically, correct an `HttpMessageContent` comment

Co-authored-by: Chris Ross <Tratcher@Outlook.com>
2023-02-24 04:06:51 +00:00
Doug Bunting 979e6ac663
Add `Content` to all `HttpResponseMessage`s (#387)
- fix #386
  - reenable `net6.0` tests disabled in #384 for this issue
- also, check `Stream.CanSeek` less when calculating `HttpMessageContent.ContentLength` value
  - use inner `HttpContent.Headers.ContentLength` if available
  - this changes behaviour slightly for both requests and responses
    - observable as `HttpMessageContent.Headers.ContentLength!=null` for empty messages
  - for responses, avoids `ContentLength==null` versus `ContentLength==0` inconsistencies (depending on platform)
  - `ContentLength==null` may still occur in some corner cases (which existed before)
    - e.g. when inner `HttpContent` doesn't know its length and `ReadAsStreamAsync()` hasn't completed
- main change means `HttpResponseMessage`s we expose to user code are consistent across platforms
  - note: user code won't see `EmptyContent` in `HttpResponseMessage`s we create
2023-02-17 12:14:39 -08:00
Doug Bunting 0f4c62480b
Test Formatting assemblies w/ `net6.0` (#384)
- expand our text matrix to include a modern (and LTS) TFM
- change how Formatting test assemblies are found
  - `netcoreapp` is no longer the only relevant folder prefix
- use the latest .NET 6 SDK
  - install the 2.1.x runtime in the pipeline
- don't require .NET in VS
  - will use binplaced `msbuild` instead
  - have `git` ignore the new .msbuild/ folder
- react to new `Exception.Message`s in `netcoreapp3.1`
  - handle different formatting of argument info in `ArgumentException.Message`s
  - handle slightly greater `decimal` precision in a `JsonReaderException.Message`
- react to new `Exception.Message`s and other changes in `net6.0`
  - handle different `Message` in `InvalidOperationException`s about invalid request URIs
- react to other changes in `net6.0`
  - handle inability to mock a `Stream` if a writer passes a `ReadOnlySpan<byte>` in `net6.0`
    - see moq/moq4#829, moq/moq4#979, and dotnet/runtime#45152 about the issue
  - skip tests failing due to `HttpResponseMessage` changes
    - see #386 and dotnet/runtime@b48900f3b3 (which introduced this)
    - fix coming **Real Soon Now™️** 😁
- nits:
  - simplify define use now that `NETCOREAPP3_1_OR_GREATER` and so on are available
  - clean up .gitignore
  - clean up a few comments and tighten scripting up
2023-02-13 12:39:52 -08:00
Doug Bunting 169d95fc06
Bump test project dependencies (#383)
Bump test project dependencies
- Castle.Core, Moq, and xUnit versions were all out of date
- hold xunit.runner.visualstudio version back in .NET SDK test projects
  - can be moved to latest version after we stop testing on netcoreapp2.1
- add missing xunit.analyzers reference to System.Web.Razor.Test project
- move all test projects to .NET v4.6.2 (a supported framework)
  - remove `netstandard` reference in System.Net.Http.Formatting.Test; not needed w/ new TFM & updated references
- further separate build of Microsoft.TestCommon project when invoked from NetCore.Test project
  - special case `RestorePackages` for this case
  - add System.Net.Http references to avoid conflicting versions e.g. src/ and test/ TFMs differ

React to changed xUnit APIs
- adjust Microsoft.TestCommon code
- nit: use `Array.Empty<byte>()` in `TranscodingStreamTests`
  - `TranscodingStream` `internal`s can be `private` instead

Resolve xUnit issues new analyzers find
- address xUnit2000 warnings
  - pass expected values to `Assert.Equal(...)` as correct (left) argument
- make generic method types explicit to avoid
  `error CS0121: The call is ambiguous between the following methods or properties: ...`
- note: cannot remove unnecessary xUnit1013 suppression
  - related bug (xunit/xunit#1466) apparently not fixed in 1.0.0 analyzers package
  - was xunit/xunit.analyzers#82 fix (in 2017) insufficient?

React to new Moq changes
- avoid `ProtectedMock\`1.ThrowIfPublicMethod(...)` `throw`ing
  - use new overloads introduced in the Moq 4.11.0 release
- adjust to Moq hiding the `ObjectProxy` type better
- update `ControllerContext` mocking to avoid NREs
  - setting `HttpContext.User` on the `Object` left `get` value `null` (did nothing)
- nit: use `SetupGet(...)` for another property
2023-01-30 20:52:17 -08:00
Doug Bunting 2ed73bc49d
Move NetCore project to use .NET SDK (#380)
Move NetCore project to use .NET SDK
- Formatting.NetCore now targets `netstandard1.3`
  - was `Profile259` aka `portable-net45+wp80+win8+wpa81`, approximately `netstandard1.0`
  - but Newtonsoft.Json.Bson supports `netstandard1.3` and up
- use Newtonsoft.Json.Bson in NetCore projects
- can now multi-target NetCore.Test as well
- nits:
  - align src/ Formatting projects as much as possible
  - align test/ Formatting projects as much as possible
  - clean up the Microsoft.TestCommon project slightly
- note: NetCore project names make no sense but I'm leaving them alone for this PR

React to using Newtonsoft.Json.Bson everywhere
- remove deprecated `BsonWriter` mentions entirely
- remove legacy BSON writer test workaround

Remove unnecessary `ConcurrentDictionary` class
- was not available in `Profile259`
- leave tests to confirm correct operation w/ "real" class

Remove `UriQueryUtility` because `WebUtility` is available everywhere
- leave test to confirm `WebUtility` continues to behave about the same
  - handle `WebUtility` being a `public` class
- change other tests to handle `WebUtility.UrlEncode(...)` encoding to uppercase
  - unlike `UriQueryUtility.UrlEncode(...)`

Add simple classes to NetCore project
- use `ICloneable` copy to get more classes compiling
  - helps NetCore in similar way to existing `MediaTypeHeaderValueExtensions`
- use `InvalidEnumArgumentException` copy to simplify code and testing
- both not available in `netstandard1.3` (or available packages) but easily duplicated

Remove unnecessary NetCore-specific GlobalSuppressions.cs file

Use `NameValueCollection` everywhere
- available (but not serializable) in `netstandard1.3`

Add `MaxDepth` support in NetCore assembly
- remove an unnecessary suppression about `MaxDepth` in `BaseJsonMediaTypeFormatter`

Add `UseDataContractJsonSerializer` support in NetCore assembly
- `XsdDataContractExporter` remains unavailable
  - update XML DCS tests to handle this (previously not in NetCore assembly)
- try various workarounds
  - `ReadOnlyStreamWithEncodingPreamble` causes tests to hit dotnet/runtime#80160
  - restriction to UTF8 when writing is a significant issue

Copy `TranscodingStream` and related files from dotnet/runtime
- my runtime clone was at 88868b7a781f4e5b9037b8721f30440207a7aa42

Adjust `TranscodingStream` and related code to compile and run here
- add conditions to avoid references to version-specific API
- remove references to internal dotnet/runtime code
  - rewrite some code more generically if performance impact likely minor
- use Microsoft.TestCommon instead of directly relying on Xunit in tests
- use C# 9.0

Use `TranscodingStream` in JSON and XML formatters
- remove `ReadOnlyStreamWithEncodingPreamble` and its tests
  - was insufficient in general and doesn't work correctly in `netstandard1.3`
  - see dotnet/runtime#80160
- now support a much broader set of encodings in JSON and XML formatters
  - not just UTF8, UTF16BE, and UTF16LE
  - JSON formatter already supported every encoding when `UseDataContractJsonSerializer` was `false`
    - no longer have this downside when property is `true`
    - however, quotas remain unsupported in `netstandard1.3` version of this formatter when property is `true`
  - XML formatter requirement for an XML declaration in non-UTF8 content was general and is no longer an issue

Add `MediaTypeMappings` support in NetCore assembly

Add `IRequiredMemberSelector` support in NetCore assembly

Remove unnecessary NETFX_CORE workarounds
- use `DefaultContractResolver`, `GuidAttribute`, `TypeDescriptor`, `XmlElement`, `XmlNode` classes
- use `IRequiredMemberSelector` interface
- use `RequestMessage.CreateResponse()` extension method
  - all available in `netstandard1.3`
- `JsonContractResolver` use is something of a late Newtonsoft.Json version reaction
  - was held back by missing `IRequiredMemberSelector`

Work around missing features in `netstandard1.3`
- get classes now included in NetCore assembly compiling
- `SerializationAttribute` is not available
  - therefore `Exception` is not serializable
  - therefore `DefaultContractResolver.IgnoreSerializableAttribute` is not available
- `Stream.(Begin|End)(Read|Write)` and `Stream.Close()` are not available
- nit: clean up `MultipartFormDataStreamProvider` whitespace
2023-01-28 13:39:45 -08:00
Doug Bunting fc1cf70d82
Use latest 2.1.x .NET SDK (#381)
- noticed CI builds were using old 2.1.500
  - `UseDotNet@2` seems to ignore `rollForward` when using global.json :frown:
- nits:
  - quiet `dotnet` in CI (where `dotnet` is always new)
  - complain about all potentially missing components when VS isn't found
  - add a missing blank line
2023-01-24 15:42:49 -08:00
Doug Bunting c98af896fc
Build w/ VS 2019; restore w/ `msbuild` (#375)
- handle both SDK-style and legacy projects in one way
  - set `$(RestorePackagesConfig)` to cover both project types
- allow newer .NET SDKs to align w/ VS components
- make a few `<import/>`s conditional to avoid problems in `Restore` target evaluation
- restore global packages.config before building to make StyleCop available
- move second copies of packages.config packages into packages/ folder
- update FxCop TFM
  - .NET 4.0 not supported because current FxCopSdk is built against .NET 4.7.2
- suppress new warnings about old FxCop approach and not using `IFormatProvider`
2022-12-12 11:16:33 -08:00
Doug Bunting 3e2e11b5a1
Use Newtonsoft.Json.Bson except in NetCore projects (#370)
- avoid obsolete `BsonReader` and `BsonWriter` classes
  - use `NETFX_CORE` for remaining legacy case (for now)
- remove `NEWTONSOFTJSON10` define; need only `NETFX_CORE` now
2022-11-23 19:26:49 -08:00
Doug Bunting d2c666066d
Bump Newtonsoft.Json to 13.0.1 (#369)
* Bump Newtonsoft.Json to 13.0.1
- also bump Newtonsoft.Json.Bson to 1.0.2 in System.Net.Http.Formatting.NetStandard
- incorporates changes from 23 Dependabot PRs; they are now obsolete
  - Dependabot also left `@(Reference)` items alone in project files 😦
  - fixed what Dependabot didn't do i.e. corrected paths and assembly identities in those items

<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/JamesNK/Newtonsoft.Json/releases">Newtonsoft.Json's releases</a>.</em></p>
<blockquote>
<h2>13.0.1</h2>
<ul>
<li>New feature - Add JsonSelectSettings with configuration for a regex timeout</li>
<li>Change - Remove portable assemblies from NuGet package</li>
<li>Change - JsonReader and JsonSerializer MaxDepth defaults to 64</li>
<li>Fix - Fixed throwing missing member error on ignored fields</li>
<li>Fix - Fixed various nullable annotations</li>
<li>Fix - Fixed annotations not being copied when tokens are cloned</li>
<li>Fix - Fixed naming strategy not being used when deserializing dictionary enum keys</li>
<li>Fix - Fixed serializing nullable struct dictionaries</li>
<li>Fix - Fixed JsonWriter.WriteToken to allow null with string token</li>
<li>Fix - Fixed missing error when deserializing JToken with a contract type mismatch</li>
<li>Fix - Fixed JTokenWriter when writing comment to an object</li>
</ul>
<h2>12.0.3</h2>
<ul>
<li>New feature - Added support for nullable reference types</li>
<li>New feature - Added KebabCaseNamingStrategy</li>
<li>Change - Package now uses embedded package icon</li>
<li>Fix - Fixed bug when merging JToken with itself</li>
<li>Fix - Fixed performance of calling ICustomTypeDescriptor.GetProperties</li>
<li>Fix - Fixed serializing Enumerable.Empty and empty arrays on .NET Core 3.0</li>
<li>Fix - Fixed deserializing some collection types with constructor</li>
<li>Fix - Fixed deserializing IImmutableSet to ImmutableHashSet instead of ImmutableSortedSet</li>
<li>Fix - Fixed deserializing IImmutableDictionary to ImmutableDictionary instead of ImmutableSortedDictionary</li>
<li>Fix - Fixed deserializing into constructors with more than 256 parameters</li>
<li>Fix - Fixed hang when deserializing JTokenReader with preceding comment</li>
<li>Fix - Fixed JSONPath scanning with nested indexer</li>
<li>Fix - Fixed deserializing incomplete JSON object to JObject</li>
<li>Fix - Fixed using StringEnumConverter with naming strategy and specified values</li>
</ul>
<h2>12.0.2</h2>
<ul>
<li>New feature - Added MissingMemberHandling to JsonObjectAttribute and JsonObjectContract</li>
<li>New feature - Added constructor to JTokenReader to specify initial path</li>
<li>New feature - Added JsonProperty.IsRequiredSpecified</li>
<li>New feature - Added JsonContract.InternalConverter</li>
<li>Change - Moved embedded debug symbols in NuGet package to a symbol package on NuGet.org</li>
<li>Fix - Fixed deserializing nullable struct collections</li>
<li>Fix - Fixed memory link when serializing enums to named values</li>
<li>Fix - Fixed error when setting JsonLoadSettings.DuplicatePropertyNameHandling to Replace</li>
</ul>
<h2>12.0.1</h2>
<ul>
<li>New feature - Added NuGet package signing</li>
<li>New feature - Added Authenticode assembly signing</li>
<li>New feature - Added SourceLink support</li>
<li>New feature - Added constructors to StringEnumConverter for setting AllowIntegerValue</li>
<li>New feature - Added JsonNameTable and JsonTextReader.PropertyNameTable</li>
<li>New feature - Added line information to JsonSerializationException</li>
<li>New feature - Added JObject.Property overload with a StringComparison</li>
<li>New feature - Added JsonMergeSettings.PropertyNameComparison</li>
<li>New feature - Added support for multiple Date constructors with JavaScriptDateTimeConverter</li>
<li>New feature - Added support for strict equals and strict not equals in JSON Path queries</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="ae9fe44e13"><code>ae9fe44</code></a> Remove compiler package and update sourcelink (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2498">#2498</a>)</li>
<li><a href="8ef662189d"><code>8ef6621</code></a> Remove prerelease for 13.0.1</li>
<li><a href="11331f50fd"><code>11331f5</code></a> Update SDK to 5.0.200 (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2495">#2495</a>)</li>
<li><a href="c7e8abc09d"><code>c7e8abc</code></a> Update to 13.0.1-beta2</li>
<li><a href="1745d7c14e"><code>1745d7c</code></a> Fix JTokenWriter when writing comment to an object (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2493">#2493</a>)</li>
<li><a href="583eb12015"><code>583eb12</code></a> Fix missing error when deserializing JToken with a contract type mismatch (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2">#2</a>...</li>
<li><a href="b6dc05be5a"><code>b6dc05b</code></a> Change MaxDepth default to 64 (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2473">#2473</a>)</li>
<li><a href="15525f1c44"><code>15525f1</code></a> Fix JsonWriter.WriteToken to allow null with string token (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2472">#2472</a>)</li>
<li><a href="926d2f0f42"><code>926d2f0</code></a> Enable embed untracked sources (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2471">#2471</a>)</li>
<li><a href="0a56633b6c"><code>0a56633</code></a> Fixes <a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2372">#2372</a> - variable typos (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2465">#2465</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/JamesNK/Newtonsoft.Json/compare/6.0.4...13.0.1">compare view</a></li>
</ul>
</details>

* React to Newtonsoft.Json changes
- react to `BsonReader`, `BsonWriter` deprecation
- one of our `DateTime` tests now consistently hits `5` errors
- `s/True/true/` also consistent now in another test
- `decimal` overflow now `throw`s a `JsonReaderException`

* Remove Newtonsoft.Json binding redirects
- where possible, entirely remove app.config files
- w/ consistent Newtonsoft.Json versions, these special cases are mostly not needed
  - auto-generation of .config file handles the special case just fine in
  System.Net.Http.Formatting.NetStandard.Test.csproj and System.Web.Http.SignalR.Test.csproj
2022-11-23 17:55:12 -08:00
Doug Bunting 06589fb442
Do not fail tests immediately (#368)
- combine `RegexReplace` into `PrintTestRunSummary` task
  - remove unused `WarnOnNoMatch` parameter; inline other parameters
  - capture test summary in `msbuild` logs
    - avoid `System.Console` use in the task
  - fail task if any tests fail
- collect `xunit` task exit codes in case of catastrophic problems (not test failures)
  - fail build if `PrintTestRunSummary` doesn't but errors occurred

also:
- do not test assemblies in parallel; reduce port contention issues
- avoid `CallTarget` task

nits:
- clean some trailing whitespace in C# sources
  - mostly files I expect to update soon
- reduce `NuGet.exe restore` verbosity; no longer debugging that
- add console summary when using build.cmd
- reduce duplication in `RestorePackages` target
  - only restore NetCore projects when `$(BuildPortable)` is `true`
  - restore src NetStandard project transitively through NetStandard.Test project
- pass more properties w/ `Restore` target invocation
2022-11-23 17:07:19 -08:00
Doug Bunting eae5661279
Ease builds on CI and locally (#364)
react to a smallish breaking change in newer Owin packages
  - add new test of `%` decoding to URI
- do not restore RuntimePortable.sln directly
  - NuGet.exe is no longer happy w/ that solution
- ignore binary logs
- ensure the .NET Core 2.1 VS component is installed
  - allow use of any 2.1.5xx .NET SDK
- add a few words to code analysis dictionary
- exclude files generated for `net45` legacy projects don't cause problems when compiling for `netstandard2.0`
- handle additional `ReflectionTypeLoadException`s when using the xUnit `msbuild` runner

nits:
- capitalize "MSBuild" consistently
- reduce indentation slightly
2022-11-19 15:32:34 -08:00
Doug Bunting cd0186268b
Move `Microsoft.Owin*` packages to 4.2.2 (#360)
- follow on from #358
- use the latest versions consistently
- correct `%(Hintpath)` metadata
  - Dependabot doesn't fix this information automatically
2022-08-29 19:28:52 -07:00
dependabot[bot] f9e0cef755
Bump Microsoft.Owin from 2.0.2 to 4.1.1 in /src/System.Web.Http.Owin (#359)
Bumps [Microsoft.Owin](https://github.com/aspnet/AspNetKatana) from 2.0.2 to 4.1.1.
- [Release notes](https://github.com/aspnet/AspNetKatana/releases)
- [Commits](https://github.com/aspnet/AspNetKatana/compare/v2.0.2...v4.1.1)

---
updated-dependencies:
- dependency-name: Microsoft.Owin
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-26 15:23:13 -07:00
独揽九天-小辉辉 0c55c2eada
Fix code bug (#356)
- address #357
2022-08-01 18:31:08 -07:00
Doug Bunting 646f45271e
Merge tag 'v3.2.8' into 'main' (#319)
- see https://github.com/aspnet/AspNetWebStack/releases/tag/v3.2.8 for prominent issues resolved as well as a more detailed list of changes

Co-authored-by: Pranav Krishnamoorthy <prkrishn@microsoft.com>
Co-authored-by: Pranav K <prkrishn@hotmail.com>
Co-authored-by: dotnet-bot <dotnet-bot@microsoft.com>
2022-04-14 18:35:46 -07:00
Doug Bunting a68a57535d
Rebrand to v3.2.9 / v5.2.9 (#299)
* Move to a current .NET SDK
- cherry-picked from release/3.2.8 commit ffbf707ddd

* Rebrand to v3.2.9 / v5.2.9
- cherry-picked from release/3.2.8 commit bc83a3a7ec (#298)
- then, switched to 3.2.9 instead of 3.2.8

- reformat README.md
  - merge 'Git tag' and 'Git branch' columns
  - remove old v3.2.4 / v5.2.4 information
  - add v3.2.7 / v5.2.7 information
2021-05-10 09:23:22 -07:00
chinason ea5b8854ad Update ReflectedHttpActionDescriptor.cs
Remove duplicated methodCall
2019-03-30 00:21:24 -07:00
Doug Bunting 39d3064baf
Flesh out `ByteRangeStream` methods to make it always limit reads (#213)
* Flesh out `ByteRangeStream` methods to make it always limit reads
- #206
- `Seek(...)` was a no-op, `Position` was incorrect if `_lowerbounds != 0`, `ReadAsync(...)` read entire inner `Stream`
  - rewrite `ByteRangeStreamTest` to cover new `ByteRangeStream` members and hold fewer resources
- remove `DelegatingStream.CopyToAsync(...)` override because it copied entire inner `Stream` and was not needed
  - base implementation invokes `ReadAsync(...)`
2018-11-27 19:17:30 -08:00
Hans van Bakel 9c86f72adc Update OkResult.cs 2018-11-27 16:27:19 -08:00
Doug Bunting 523f3aa890
Override `TryComputeLength(...)` in web host `HttpContent` implementations (#212)
- #197
- other implementations in this repo are already fine
2018-11-21 10:37:34 -08:00
Doug Bunting 37fce367eb Make `OwinHttpRequestContext.VirtualPathRoot` unescaped
- #203
- now consistent with other overrides of this property
2018-11-20 16:04:18 -08:00
Tornike Kharaishvili e0f1f1338e FormattingUtilities support for parsing dates in RFC 850 long year format (#196)
- also add RFC 850 long year format related test case
2018-09-19 09:43:23 -07:00
Maxime Rouiller 9133fbdcdd changes to repository url 2018-08-22 09:11:55 -04:00
Trofimov Ivan Andreevich 08a202b95f review fixes; added tests 2018-08-16 22:37:47 +03:00
Trofimov Ivan Andreevich cc39a81d01 StyleCop fixes 2018-08-08 16:42:44 +03:00
Trofimov Ivan Andreevich 83d5629c13 passing rethrow flag through ctor, not throught CorsPolicy 2018-08-08 16:22:49 +03:00
Trofimov Ivan Andreevich 1b5e6a49d2 build fix 2018-08-08 15:50:57 +03:00
Trofimov Ivan Andreevich a890df4724 general idea of fix for https://github.com/aspnet/AspNetWebStack/issues/147 2018-08-08 14:42:15 +03:00
JamesSinclairBiomni e940ddf9bd Changes following review 2018-07-25 16:24:07 +01:00
James Sinclair 1f27750128 fix for https://github.com/aspnet/AspNetWebStack/issues/173 2018-07-04 22:55:50 +01:00
Doug Bunting 749384689e
Merge pull request #166 from brandondahler/bugfix/NestedDropDownList
Update SelectExtensions to handle nested expressions where no name is parsed
2018-06-23 13:25:12 -07:00
Brandon Dahler 8b1a545850 Update SelectExtensions to handle nested expressions where no name is parsed. 2018-05-31 03:12:40 +01:00
Brandon Dahler 016839472e RadioButtonFor doesnt resolve isChecked properly when nested in EditorTemplate 2018-05-30 03:48:09 +01:00
Doug Bunting 8eb4d1cddb
Move to 5.2.7 / 3.2.7 Preview1
- #159 part 1 of 2
- match 3155d174ba i.e. the upgrade to 5.2.6 / 3.2.6 Preview1
2018-05-17 15:44:11 -07:00
Doug Bunting 3155d174ba
Move to 5.2.6 / 3.2.6 Preview1
- match combination of eb1bfe51a1 and 986889d81c i.e. the upgrade to 5.2.5 / 3.2.5 Preview1
- also change README.md to use "Web API 5.x" instead of "Web API 2.x"
2018-05-02 16:49:39 -07:00
Patric Forsgard 7b86abfbad Initialize the ApiDescription.ResponseDescription in ctor 2018-03-29 19:35:14 +02:00
Doug Bunting b32ab42712
Do not include compiler-generated names in expression names
- #117
- see also aspnet/Mvc@a045324d3a and PR aspnet/Mvc#3027, the fix for aspnet/Mvc#2890

nits: copy some improved comments from aspnet/Mvc@a045324d3a
2018-03-12 12:53:49 -07:00
Doug Bunting 2b7ac74060
Do not use `FormattedModelValue` in password editor template
- #135
- see also PR aspnet/Mvc#7430
- add quirk switch to reverse this if necessary
2018-03-02 16:25:49 -08:00
Doug Bunting f9e06d60e4 Restore `HttpRequestContext.Principal` after executing inner message handlers
- #119

nits: use `var` more in affected tests
2018-02-21 08:51:00 -08:00
Doug Bunting 986889d81c Fix build break
- revert part of eb1bfe51a1
- Web Pages assemblies do not get new versions release-to-release
- CI still builds Facebook assemblies with version 1.1.0.0 and that doesn't need to change
2018-02-02 11:06:52 -08:00
Doug Bunting eb1bfe51a1 Move to 3.2.5 Preview1 2018-02-01 21:29:21 -08:00
Doug Bunting 9829dd8225 Give `ValidationContext.MemberName` a distinct value from `DisplayName`
- #120
- revert to previous behavior if `webapi:UseLegacyValidationMemberName` application setting is `true`
2018-02-01 16:39:52 -08:00
Doug Bunting b1445a7253 Target .NET Standard 2.0
- simplify .NET Standard projects and use Microsoft.NET.Sdk in test project
- depend on Newtonsoft.Json v10 and Newtonsoft.Json.Bson v1 packages
  - Newtonsoft.Json v9.0.1 has a reduced API when targeting .NET Standard
  - adjust a few tests to handle changes between v9 and v10
- test .NET Standard library on both .NET 4.6.1 and .NET Core 2.0
  - update test/Directory.Build.targets to handle testing with .NET Core; use it from Runtime.msbuild
  - adjust a few tests to handle .NET Core 2.0 differences and gaps
  - found and fixed a broken test in `HttpValueCollectionTest`
2017-11-20 14:45:19 -08:00
Doug Bunting 15169a59e9 Fix CA2227, "Collection properties should be read only" warnings (as errors)
- follow up to eebbf3884
2017-11-01 12:14:54 -07:00
Doug Bunting eebbf38846 Make subclassing `DefaultBodyModelValidator` more useful
- #9
- add `BodyModelValidatorContext` and `IBodyModelValidatorKeyBuilder`
2017-10-31 10:04:26 -07:00