Commit Graph

411 Commits

Author SHA1 Message Date
Chris Ross 3b9c16ce28
Cherry pick preview8 changes into master (#24849)
* Pass RequestAborted to SendFileAsync

* Fix HttpSys tests
2020-08-12 21:30:04 +00:00
Levi Broderick bbf7c8780c
Clean up some usage of SHA1 and SHA256 in the code base (#24696)
* AntiForgery: Use SHA256 one-shot

* AuthN: Use SHA256 one-shot APIs

* MVC/Razor: Cleanup SHA256 references

* WebSockets: Use SHA1 one-shots

* dotnet-openapi: Use preferred SHA256 factory

* SignalR: Prefer RNG.Fill over RNG.GetBytes
2020-08-10 14:26:41 -07:00
Kahbazi d0a8117ac4
Use HasFlag in ForwardedheadersMiddleware (#24660) 2020-08-08 02:36:19 +00:00
John Luo 5782872f7f
Quarantine test (#24147) 2020-07-21 09:52:55 -07:00
Doug Bunting 5266918ed2
Use Roslyn to create ref/ assemblies (#23403)
* Remove all ref/ projects

* Remove GenAPI infrastructure

* Remove notion of a reference assembly project
  - remove `$(IsReferenceAssemblyProject)`, `$(ReferenceReferenceAssemblies)` and `$(ReferenceImplementationAssemblies)`
    - remove unnecessary `$(NoWarn)` settings

nits:
- remove a few misleading comments
- wrap some long lines

* Move .0 package version workaround into Versions.props
  - touch up SharedFramework.External.props

* Expose `%(LatestPackageReference.RTMVersion)` metadata
  - automate use of properties in the `@(LatestPackageReference)` item group to make this maintainable
    - add a couple of special cases at the bottom of eng/Dependencies.props
    - add one more `$(...PackageVersion)` property to avoid yet-another special case

* Enable Roslyn reference assemblies
  - exclude ref/ assembly from packages other than targeting pack
  - update Microsoft.AspNetCore.App.Ref.csproj
    - `%(IsReferenceAssembly)` and `%(ReferenceGrouping)` metadata no longer relevant
    - only ref/ assemblies are in `@(ReferencePathWithRefAssemblies)` item group

nits:
  - remove now-unnecessary workaround
    - issues with TFM transition are behind us
  - clean up Microsoft.AspNetCore.App.Runtime.csproj slightly
    - use `GeneratePathProperty="true"`
        - reorder item / property settings for meta-expansion
    - correct spelling errors and phrasing in comments

* Update documentation to reflect recent changes
  - remove CrossRepoBreakingChanges.md; was tied to old TeamCity infrastructure
    - also much less relevant given repo merges
  - adjust details and examples in ReferenceResolution.md
    - reflect repo merges, Dependencies.props changes, and current Maestro++ channels
    - add a few more details e.g. specific files where Version.Details.xml versions are used

* !fixup! Remove another irrelevant doc file

* !fixup! Address PR review suggestions
  - convert a couple of warnings to errors
  - use consistent casing for Microsoft.NETCore.App.Runtime.* packages
  - reduce `%(LatestPackageReference.Version)` metadata special cases
  - add and improve comments e.g.
    - improve comments about `$(*V0PackageVersion)` properties
    - improve placement of comments about item removal in ResolveReferences.targets
    - confirmed `$(*V0PackageVersion)` property list is complete

nits:
- fix solution example in ReferenceResolution.md
- remove item group definition for `@(LatestPackageReference)`
- remove `%(LatestPackageReference.VersionName)` metadata after use; large item group
    - similarly, remove `%(LatestPackageReference.RTMVersion)` when not needed; just complicates `Condition`s

When I squash, I must remember this fixes
- #14801
- dotnet/aspnetcore-internal#2693

* Actually use `%(LatestPackageReference.RTMVersion)` metadata
  - gather RTM package references in a new project
    - a (very) separate project to work around package conflict resolution
    - empty `Test` target works around Arcade's testing approach
  - new target in ResolveReferences.targets updates relevant assembly paths to use the RTM packages
    - done as soon as possible after `ResolvePackageAssets` determines the paths
    - done for all compilation inputs, not just ref/ assemblies
2020-07-17 13:35:17 -07:00
Ryan Brandenburg 917078ddb7
Merge pull request #21928 from Kahbazi/patch-15
Remove Obsolete constructor in RequestLocalizationMiddleware
2020-07-10 09:43:03 -07:00
Youssef Victor 32b8ad6dce
Add missing comma to xml documentation (#23634) 2020-07-09 16:02:11 -07:00
Kahbazi 906d5e3db0
Update reference assemblies 2020-07-09 12:02:44 +04:30
Kahbazi d16d426efd
Remove Obsolete constructor in RequestLocalizationMiddleware 2020-07-09 12:01:29 +04:30
Kevin Pilch 3117f43c33
Migrate to single sln file + slnf files (#23581) 2020-07-08 15:27:22 -07:00
Brennan f1dd68f1bd
[Middleware] Move to GenericHost (#23626) 2020-07-07 17:32:35 -07:00
Kahbazi 5a375a7c22
Add Extensions method for options (#23602) 2020-07-06 11:54:44 -07:00
Pranav K 9a4e6cf97c
Merge remote-tracking branch 'origin/release/5.0-preview7' 2020-07-02 11:42:14 -07:00
Ajay Bhargav B 7f4b846e9f
Made the encodings of .razor and .cshtml files in the repo consistent (#23502)
* Added UTF8 BOMs to .razor and .cshtml files

* Fixes and unquarantined BOM tests

* Update .editorconfig
2020-06-30 12:03:01 -07:00
Martin Costello acabbbc61b
Remove QueuePolicy locks (#23187)
* Use field rather than property

Operate on a field directly, rather than through a property.

* Make field readonly

Make field read-only as its value is never changed.

* Remove lock

Use Interlocked.Decrement() instead of taking a lock.

* Remove lock for increment

This removes the need for the lock in the success case at the cost of an extra  Interlocked.Decrement() call for the failed case.

* Fix typos

Change "availible" to "available".

* Add unit test for full queue

Add a unit test that validates request is not queued if the queue is already full.
2020-06-30 05:11:58 +00:00
Martin Costello c19f3d29ca
Only look-up Cache-Control once (#23329)
Only look-up the Cache-Control header once, rather than twice if non-empty.
2020-06-24 22:48:36 +00:00
Martin Costello 5155e11120
Two minor perf tweaks in CORS and Localization middleware (#23190)
* Use char instead of char[] for string.Split

Use the newer overload for string.Split() that accepts a char instead of creating a char array.

* Remove redundant bounds check

Remove redundant bounds check for count of exactly 1 as that has already been checked to be true by the previous check.
2020-06-24 07:17:33 -07:00
Stephan Troyer 7aa91ffd62
SpaProxy: Fix proxying of WebSocket protocol (#23250) 2020-06-23 16:20:00 -07:00
Doug Bunting c4c6e25a06
Add missing doc files and cleanup nits (#22931)
* nit: Remove useless `$(HasReferenceAssembly)` settings
  - set in /Directory.Build.targets
    - `true` only in `$(IsAspNetCoreApp)` projects
* nit: Remove useless `$(CompileUsingReferenceAssemblies)` settings
  - no current versioning differences between ref/ and src/ assemblies when targeting default TFM
* Add more `$(GenerateDocumentationFile)` settings
  - increases the number of generated doc files, mostly without problems
- !fixup! correct typo in `DebugProxyHost` doc comments
    - was not generating a doc file before
  - remove previous (ineffective) src/Components/Directory.Build.targets setting
  - nit: remove a duplicate `$(GenerateDocumentationFile)` setting
* nit: Remove useless `$(IsPackable)` settings
  - only analyzers and implementation projects are packable by default
    - main use case for explicit setting is projects shipping only in shared framework
  - conditional setting in src/Mvc/Directory.Build.props just subset logic in /Directory.Build.targets
* nit: Remove useless `$(IsProjectReferenceProvider)` settings
  - only implementation projects are providers by default
* nit: Remove useless `$(IsTestAssetProject)` settings
  - set in src/Mvc/test/WebSites/Directory.Build.props
* !fixup! Looks like `InProcessNewShimWebSite` must compile w/o ref/ assemblies
  - restore `$(CompileUsingReferenceAssemblies)` in this one project
2020-06-17 13:04:45 -07:00
Ken Dale 28ed208022
Add SetIsOriginAllowedToAllowWildcardSubdomains_DoesNotAllowRootDomain test (#23001)
This test makes it clear root domains are not included in CORS subdomain wildcards
2020-06-17 06:22:20 -07:00
brianchance a0827ace5e
Change default for queryStringDelete (#21586) 2020-06-15 14:46:40 -07:00
Huei Feng 7cdbaeeccf
Update Async To MigrationsEndPointMiddleware (#22573) 2020-06-15 14:42:55 -07:00
Scott Addie 11fb7b67d1
Add detail to InvalidOperationException in Exception Handler Middleware (#22858) 2020-06-15 11:31:23 -07:00
John Luo ef9a3662d6
Also set no-store when we set no-cache in response cache control headers (#22842) 2020-06-11 20:38:54 -07:00
Javier Calvarro Nelson a27356078f
Disable Yarn warnings on CI builds for restore and Blazor WebAssembly projects (#22703)
Disables warnings when running the Yarn task in CI environments. You'll still get the warnings on developer builds.
2020-06-09 09:53:50 -07:00
Kirill Osenkov 0e7ca749de
Add a Mime Type for .exe and .dll files. (#21805)
* Add a Mime Type for .exe and .dll files.

Useful for serving downloads of installers.
Could be application/octet-stream, but I hear application/vnd.microsoft.portable-executable is specified by IANA here:

https://www.iana.org/assignments/media-types/application/vnd.microsoft.portable-executable

* Update src/Middleware/StaticFiles/src/FileExtensionContentTypeProvider.cs

Co-authored-by: Chris Ross <Tratcher@Outlook.com>

* Update src/Middleware/StaticFiles/src/FileExtensionContentTypeProvider.cs

Co-authored-by: Chris Ross <Tratcher@Outlook.com>

Co-authored-by: Chris Ross <Tratcher@Outlook.com>
2020-06-05 20:21:31 +00:00
Doug Bunting 256045729a
Add `SuccessfulTests` to ensure something runs in every non-Helix run (#22406)
* Remove extra `[SkipOnHelix]` attribute
- only need the one compiled into Microsoft.AspNetCore.Testing
- update the documentation to reflect this
  - nit: address Markdown warnings that VS Code showed

* Add `SuccessfulTests` to ensure something runs in every non-Helix runs
- #22241
- cleans up hundreds of warnings but leaves a couple for the Blazor tests assembly
  - see comments about xUnit runner command line in the new class
2020-06-02 12:19:28 -07:00
Michelle Tan 6afd6f40c0
Fix tiny typo in ErrorContext summary. (#22190) 2020-05-24 19:41:19 -07:00
Hao Kung a806ae62c3
Add helix-matrix.yml and windows arm 64 helix queue (#22002) 2020-05-23 17:08:18 -07:00
dotnet-maestro[bot] d5849f3534
[master] Update dependencies from dotnet/arcade dotnet/aspnetcore-tooling (#21630)
* Update dependencies from https://github.com/dotnet/arcade build 20200511.9
- Microsoft.DotNet.Arcade.Sdk: 5.0.0-beta.20228.4 => 5.0.0-beta.20261.9
- Microsoft.DotNet.GenAPI: 5.0.0-beta.20228.4 => 5.0.0-beta.20261.9
- Microsoft.DotNet.Helix.Sdk: 5.0.0-beta.20228.4 => 5.0.0-beta.20261.9

* Update dependencies from https://github.com/dotnet/aspnetcore-tooling build 20200514.6

Microsoft.AspNetCore.Mvc.Razor.Extensions , Microsoft.AspNetCore.Razor.Language , Microsoft.CodeAnalysis.Razor , Microsoft.NET.Sdk.Razor
 From Version 5.0.0-preview.5.20261.4 -> To Version 5.0.0-preview.6.20264.6

* Pre-emptively take -nobl change

* Disable binlogs in CI

* Fix build.sh to know about -nobl

* Align build.ps1|sh with latest Arcade parameters
- do not enable binary logs by default in CI builds
- leave `-binaryLog` and `-excludeCIBinaryLog` handling to eng/common/tools.ps1|sh
  - was unnecessary since `-bl /bl:{some name}` worked fine, ignoring OOMs

nit: document `-excludeCIBinarylog` a bit more

* Do not pass unknown options into CodeCheck.ps1

* Pass `-ci -nobl` into remaining CI build jobs

* Switch default TFM to `net5.0`

* Update missing project templates tfms

* Add more `-ci -nobl`
- needed because _all_ builds in the pipeline are implicitly CI builds
  - default-build.yml adds `-ci` when script wasn't explicit

* Default templates to net5.0

* PR feedback

* Update TFMs in explicit .nuspec files

* Update TFMs in test projects

* Update TFMs in test C# code

* Update TFMs in infrastructure files

* Future-proof a check for `net5.0` or later
- avoid comparisons involving `$(TargetFramework)` in .targets files
  - fine to compare it with `''` or `$(DefaultNetCoreTargetFramework)`

* !fixup! Undo a couple of earlier fixes
- remove a duplicate `$()` setting
- correct the one remaining versioned `#if` define
  - did not make it `#if NETCOREAPP` because benchmarks test numerous .NET Core TFMs

* Disable binary logs in CodeCheck.ps1

* Specify `-ci -nobl` just once when using `parameters.buildArgs`

* Restore `$binaryLog` default logic

Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>
Co-authored-by: Will Godbe <wigodbe@microsoft.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
2020-05-15 00:17:02 +00:00
Artyom Tarasov 17c90a7e17
Fix for https://github.com/dotnet/aspnetcore/issues/17277 (#21819)
Fixed adding a string with a large number of trailing zeros to StringBuilder, which sometimes caused the thread to hang
2020-05-14 10:47:26 -07:00
Stephen Halter 5607ea1e0c
Remove workaround in HeaderPropagationMiddleware (#20533)
Fixed by #14146 which starts each request on a fresh ExecutionContext
2020-04-09 16:43:18 -07:00
John Luo 3ec1676ac6
Ingest updated packages from dotnet/runtime (#20300) 2020-04-06 01:06:22 -07:00
Kevin Pilch f34033a415 Add .vsconfig files in root and beside slns 2020-03-31 14:25:44 -07:00
Chris Pickford 3eb778fb41
Added null check to CorsPolicyBuilder (#19831)
* Added null check to CorsPolicyBuilder

* Replaced string.IsNullOrEmpty with null check

* Added inner null check + updated unit test

#19830

* Unit Tests: Reverted Theory to separate Facts

* Strongly typed args

Co-authored-by: Chris Pickford <chris.pickford@aldautomotive.com>
2020-03-30 19:32:30 +00:00
huysentruitw bb2e2a9160
Obsolete ReceiveBufferSize in WebSocketOptions #20084 (#20189)
* Obsolete ReceiveBufferSize in WebSocketOptions

* Update reference

* Update obsolete messages
2020-03-26 18:02:30 +00:00
Radek Falhar e21fb7e93c
Fix #19991 Made TestHost fail when Response Flush is called with AllowSynchronossIO being dissabled (#20059) 2020-03-26 09:46:15 -07:00
dotnet-maestro[bot] 30c5484424
[master] Update dependencies from dotnet/efcore (#20107)
* Update dependencies from https://github.com/dotnet/efcore build 20200324.2

- Microsoft.EntityFrameworkCore.Tools - 5.0.0-preview.3.20174.2
- Microsoft.EntityFrameworkCore.SqlServer - 5.0.0-preview.3.20174.2
- dotnet-ef - 5.0.0-preview.3.20174.2
- Microsoft.EntityFrameworkCore - 5.0.0-preview.3.20174.2
- Microsoft.EntityFrameworkCore.InMemory - 5.0.0-preview.3.20174.2
- Microsoft.EntityFrameworkCore.Relational - 5.0.0-preview.3.20174.2
- Microsoft.EntityFrameworkCore.Sqlite - 5.0.0-preview.3.20174.2

* Update dependencies from https://github.com/dotnet/efcore build 20200324.3

- Microsoft.EntityFrameworkCore.Tools - 5.0.0-preview.3.20174.3
- Microsoft.EntityFrameworkCore.SqlServer - 5.0.0-preview.3.20174.3
- dotnet-ef - 5.0.0-preview.3.20174.3
- Microsoft.EntityFrameworkCore - 5.0.0-preview.3.20174.3
- Microsoft.EntityFrameworkCore.InMemory - 5.0.0-preview.3.20174.3
- Microsoft.EntityFrameworkCore.Relational - 5.0.0-preview.3.20174.3
- Microsoft.EntityFrameworkCore.Sqlite - 5.0.0-preview.3.20174.3

* Update dependencies from https://github.com/dotnet/efcore build 20200324.4

- Microsoft.EntityFrameworkCore.Tools - 5.0.0-preview.3.20174.4
- Microsoft.EntityFrameworkCore.SqlServer - 5.0.0-preview.3.20174.4
- dotnet-ef - 5.0.0-preview.3.20174.4
- Microsoft.EntityFrameworkCore - 5.0.0-preview.3.20174.4
- Microsoft.EntityFrameworkCore.InMemory - 5.0.0-preview.3.20174.4
- Microsoft.EntityFrameworkCore.Relational - 5.0.0-preview.3.20174.4
- Microsoft.EntityFrameworkCore.Sqlite - 5.0.0-preview.3.20174.4

* Update dependencies from https://github.com/dotnet/efcore build 20200324.5

- Microsoft.EntityFrameworkCore.Tools - 5.0.0-preview.3.20174.5
- Microsoft.EntityFrameworkCore.SqlServer - 5.0.0-preview.3.20174.5
- dotnet-ef - 5.0.0-preview.3.20174.5
- Microsoft.EntityFrameworkCore - 5.0.0-preview.3.20174.5
- Microsoft.EntityFrameworkCore.InMemory - 5.0.0-preview.3.20174.5
- Microsoft.EntityFrameworkCore.Relational - 5.0.0-preview.3.20174.5
- Microsoft.EntityFrameworkCore.Sqlite - 5.0.0-preview.3.20174.5

* React to EF Migrations breaking changes

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: AndriySvyryd <Andriy.Svyryd@microsoft.com>
2020-03-25 03:19:39 +00:00
Andrew Stanton-Nurse 8ec31594ea
Fix #2442 by adding webmanifest extension to content-type map (#19661) 2020-03-09 17:30:54 -07:00
John Luo d2b67cad82 Feedback 2020-03-06 12:42:42 -08:00
John Luo f05e019271
Merge branch 'master' into johluo/migrate-logging-testing 2020-03-04 22:17:06 -08:00
John Luo c181547864 Migration fixup for Logging.Testing 2020-03-04 22:10:12 -08:00
Andrew Stanton-Nurse e65408a36c
unquarantine a pile of long-passing tests (#19440) 2020-02-28 19:02:58 +00:00
Maher Jendoubi 1a4dbb7cc5
Contributing: fixed some typos (#18494)
* Contributing: fixed some typos

* Spotted another typo

* this will cause a breaking change

* made DefaultDisconetTimout readonly

* made ConnectionOptionsSetup class internal

* Revert "made ConnectionOptionsSetup class internal"

This reverts commit 90f94d257bf5c953415c2f581f0a24a6f9bd51f6.

* Update HttpConnectionDispatcher.Log.cs

* Apply suggestions from code review

Co-authored-by: Brennan <brecon@microsoft.com>
2020-02-25 02:11:17 +00:00
Kahbazi 09bb7b4ca5
Add WebSockets Benchmarks project back to solution (#19302) 2020-02-24 23:24:20 +00:00
John Luo a5fc9defc4 Regenerate ref assemblies 2020-02-20 16:53:07 -08:00
John Luo 5f9f1ce183 Merge branch 'master' into johluo/migrating-extensions 2020-02-20 16:44:06 -08:00
John Luo 7d1f5d8c0b Updates for extensions migrations
- Multi-target ObjectPool
- Move Embedded.Manifest.Task.Internal.Entry to the public namespace
- Remove ref assemblies from AspNetCore.Testing
- Skip TestPathUtilitiesTest since it's a pattern we want to migrate away from
- Fix FileProviders.Abstractions version in Embedded.*.nuspec
- Add workarounds for project references to FileProviders.Embedded
2020-02-20 14:00:29 -08:00
Brennan 1e03d57deb
Merge branch 'master' into halter73/mega-merge 2020-02-19 14:20:10 -08:00
Brennan Conroy 2d066dcd3e Apply some fixes 2020-02-19 14:18:29 -08:00