Commit Graph

19168 Commits

Author SHA1 Message Date
Ben Adams f5fa16e998
Make HTTP/1.1 startline parsing "safe" (#20885) 2020-04-23 18:32:54 -07:00
Brennan 2cd6a13a56
Quarantine flaky test (#21156) 2020-04-23 14:17:34 -07:00
Hao Kung 9ae096c929
Quarantine identity test (#21102) 2020-04-23 11:03:51 -07:00
Brennan 1cd85c3ff9
Fix SiteExtension build and warning (#21131) 2020-04-22 20:14:20 -07:00
Brennan d775e9d959
Fixing build warnings (#21044) 2020-04-22 15:36:40 -07:00
Brennan f7c26b3130
Quarantine test that caused test abort (#21113) 2020-04-22 15:34:23 -07:00
John Luo 241dc6b98e
Fix race in gRPC interop test logging (#21080)
* Remove server-side logging
2020-04-22 14:28:47 -07:00
George 2456e19de2
Use encodeURIComponent instead of encodeURI to support returnURLs with more than one query (#20874)
When return URLs query parameters such as
2020-04-22 09:39:48 -07:00
Martin Costello 0ee1420c7f
Fix missing space in exception message (#20900)
Fix missing space in exception message when the .deps file cannot be found.
2020-04-22 09:39:02 -07:00
Ryan Nowak 80861f1da9
Fix use of precedence in endpoint routing DFA (#20801)
* Fix use of precedence in endpoint routing DFA

Fixes: #18677
Fixes: #16579

This is a change to how sorting is use when building endpoint routing's graph of
nodes that is eventually transformed into the route table. There were
bugs in how this was done that made it incompatible in some niche
scenarios both with previous implementations and how we describe the
features in the abstract.

There are a wide array of cases that might have been impacted by this
bug because routing is a pattern language. Generally the bugs will involve a
catch-all, and some something that changes ordering of templates.

Issue #18677 has the simplest repro for this, the following templates
would not behave as expected:

```
a/{*b}
{a}/{b}
```

One would expect any URL Path starting with `/a` to match the first
route, but that's not what happens.

---

The root cause of this bug was an issue in how the algorithm used to be
build the DFA was designed. Specifically that it uses a BFS to build the
graph, and it uses an up-front one-time sort of endpoints in order to
drive that BFS.

The building of the graph has the expectation that at each level, we
will process **all** literal segments (`/a`) and then **all** parameter
segments (`/{a}`) and then **all** catch-all segments (`/{*a}`). Routing
defines a concept called *precedence* that defines the *conceptual*
order in while segments types are ordered.

So there are two problems:

- We sort based on criteria other than precedence (#16579)
- We can't rely on a one-time sort, it needs to be done at each level
(#18677)

---

The fix is to repeat the sort operation at each level and use precedence
as the only key for sorting (as dictated by the graph building algo).

We do a sort of the matches of each node *after* building the
precedence-based part of the DFA, based on the full sorting criteria, to
maintain compatibility.

* Add test
2020-04-21 22:48:27 -07:00
Doug Bunting 2e970f8e4f Quarantine recent test failures
- see also #21080 for another recent failure
2020-04-21 22:27:15 -07:00
David Fowler f9a9788c67
Use the default pipe options for backpressure (#21001)
* Use the default pipe options for backpressure
- This controls memory so clients aren't easily overwhelmed. With the changes made to Pipe to no longer throw if the pause threshold is exceeded makes this work well.
- Remove PipeReaderFactory
- Implement cancellation in SSE

Contributes to #17797
2020-04-21 16:31:18 -07:00
Brice Lambson 929f68bd87 Use SQLite write-ahead logging and shared caches
This will result in less locking and, thus, greater throughput.
2020-04-21 12:44:22 -07:00
James Newton-King 42056d27d2
Remove flaky FlowControl_ParallelStreams_FirstInFirstOutOrder… (#21037) 2020-04-21 15:44:02 +12:00
Pranav K 4191eb5c76
Use System.Text.Json's copy ctor (#21016) 2020-04-20 11:14:17 -07:00
David Fowler ab0a422154
Add missing projects to allow solution build (#21000) 2020-04-19 21:58:35 -07:00
Pranav K 99781d3b25
Share SignalR's HubProtocol implementation in Blazor (#20922) 2020-04-18 10:07:51 -07:00
David Fowler 812dfb97d3
Fix TimerAwaitable rooting (#20937)
* Fix TimerAwaitable rooting
- This fixes an issue where components that use timer awaitable currently need to be explicitly stopped and disposed for it to be unrooted. This makes it possible to write a finalizer.
2020-04-17 19:05:44 -07:00
Safia Abdalla 8b6ccff647
Fix AuthStateAsyncReturnsUnrelatedCancelledTask_TreatAsFailure flake (#20881) 2020-04-17 06:55:20 -07:00
Daniel Eisterhold cf1c5cbb52
Fix content showing on top of sticky header (#20283)
Fix content showing on top of sticky header
2020-04-17 13:21:43 +01:00
David Fowler de63489aca
Add support for listening to arbitrary endpoints (#20892)
* Add support for listening to arbitrary endpoints
- This adds support for kestrel using arbitrary transports with any endpoint. This lets the consumer set an endpoint that flows all the way to the transport.
- Added tests

* Update src/Servers/Kestrel/Core/src/KestrelServerOptions.cs

Co-Authored-By: Chris Ross <Tratcher@Outlook.com>

Co-authored-by: Chris Ross <Tratcher@Outlook.com>
2020-04-16 23:57:41 -07:00
Brennan e569e7c770
Update BenchmarkDotNet for 5.0 (#20889) 2020-04-16 22:37:56 -07:00
Scott Addie b89880b1a6
Define default unpkg file for SignalR MsgPack library (#20703) 2020-04-17 02:51:14 +00:00
Scott Addie dcff62347e
Define default unpkg file for SignalR JS client (#20697)
Fixes #20696
2020-04-17 02:07:08 +00:00
Javier Calvarro Nelson 8e1e81ae78
[HTTPS] Update certificate strategy for Mac OS (#20022)
* Fixes and improvements for dotnet-dev-certs:
* Revamps the HTTPS developer certificate tool implementation.
  * It accumulated a lot of cruft during the past few years and that has made making changes harder.
* Separated the CertificateManager implementation into different classes per platform.
  * This centralizes the decision point of choosing a platform in a single place.
  * Makes clear what the flow is for a given platform.
  * Isolates changes needed for a given platform in the future.
* Moved CertificateManager to a singleton
  * No more statics!
* Updates logging to use EventSource
  * We didn't have a good way of performing logging as the code is shared and must run in multiple contexts and the set of dependencies need to be kept to a minimum.
  * Adding ETW allow us to log/monitor the the tool execution and capture the logs with `dotnet trace` without having to invent our own logging.
  * We can decide to write an EventListener in `dotnet-dev-certs` to write the results to the console output.
* Updates the way we handle the dev-cert in Mac OS to use the security tool to import the certificate into the store instead of using the certificate store.
2020-04-16 13:52:10 -07:00
Ryan Brandenburg 820b0b20c0
Remove SPA project template tests (#20863) 2020-04-16 09:19:05 -07:00
Sébastien Ros 5b5784d950
Merge pull request #20873 from dotnet-maestro-bot/merge/release/3.1-to-master
[automated] Merge branch 'release/3.1' => 'master'
2020-04-15 15:50:25 -07:00
Sébastien Ros b243ae1615
Fixing QueryCollection property documentation (#20044)
* Fixing QueryCollection property documentation

* Update src/Http/Http/src/QueryCollection.cs

Co-Authored-By: Chris Ross <Tratcher@Outlook.com>

Co-authored-by: Sourabh Shirhatti <shirhatti@outlook.com>
Co-authored-by: Chris Ross <Tratcher@Outlook.com>
2020-04-15 22:28:43 +00:00
Sébastien Ros 998ebad707
Merge branch 'master' into merge/release/3.1-to-master 2020-04-15 13:01:24 -07:00
David Fowler 1b99352ec7
Don't re-use DefaultHttpContext if IHttpContextAccessor is in use (#15049) (#20844)
* Don't re-use DefaultHttpContext if IHttpContextAccessor is in use
- Consumers may still get null or an ODE but will never end up with data from a different request.
- Make sure an ODE is thrown from all properties on HttpContext after the request is over.
2020-04-15 12:41:59 -07:00
Brennan 5353ce9509
Use SemVer1 for SiteExtension (#20839) 2020-04-15 12:26:21 -07:00
WuYafeng 377b9e5e09
Inconsistency between file `BuildServiceProviderAnalyzer.cs` and type `BuildServiceProviderValidator` (#20804) 2020-04-15 09:38:53 -07:00
Stephen Halter ea555458dc
Always flush HTTP/2 headers despite flow control (#20831) 2020-04-15 09:22:27 -07:00
BrennanConroy 260de2c10b Add BuildNumber to SiteExtension build 2020-04-14 13:42:25 -07:00
William Godbe 01429973ee
[release/3.1] Pass access token as query string when running SignalR in the browser (#20466)
* Pass access token as query string when running SignalR in the browser

* WEBASSEMBLY -> BROWSER
2020-04-14 12:59:06 -07:00
Alessio Franceschelli 970c9244c7
ModelValidation: Fixed MaxDepth exception when there are more items left then MaxValidationDepth after reaching MaxAllowedErrors (#18212)
* Consolidated similar tests in a theory

* Fix for InvalidOperationException when reached maxAllowedErrors and there are more items left then max depth

* Refactored Visitor logic to reduce the risk of a missing Pop.

* Added comment on when it can throw

* Updated reference assembly

* Reverted publid API change
2020-04-14 12:45:20 -07:00
William Godbe 8218d6e0e7
Fix various "Type or namespace not found" errors (#20736)
* Add manual packageReferences where needed

* Add more explicit packageRefs

* Fix typo

* undo changes to blazor.server.js

* Fix typo

* Don't gen ref assemblies in CodeCheck
2020-04-14 10:57:26 -07:00
N. Taylor Mullen e7df020906 Quarantine AppCanHandleClientAbortingConnectionMidRequest. 2020-04-14 10:39:31 -07:00
Wayne Adams 75c779773f
Add missing OffsetX and OffsetY events to MouseEventArgs. (#20478)
* Add missing OffsetX and OffsetY events to MouseEventArgs.
* Update public interfaces
* Generate Reference Assemblies
2020-04-14 10:00:32 -07:00
Thomas Levesque 5d914d4d2d
Implement HttpRequestStreamReader.ReadToEndAsync (#18232) 2020-04-13 23:40:21 -07:00
Helgevold Consulting, LLC 70daed535a
Allow access to msgpack configuration options (#20438) 2020-04-13 21:58:03 -07:00
Ben Adams 6016e70285
Make header parsing "safe" (#20562)
* OnHeadersComplete improve speculation and memory ordering (VTune)
2020-04-13 09:46:43 -07:00
Alessio Franceschelli e3d3da3546
HttpRequestStreamReader overrides for Read Span, ReadAsync Memory, ReadLine and ReadLineAsync (#18802) 2020-04-13 08:18:12 -07:00
Brennan 2b7b79f4db
Fix flaky HealthCheck test (#20741) 2020-04-11 17:22:22 -07:00
Pranav K 3c1bd093e9
Print disk usage (#20704)
* Print disk usage
* Try again
* Disk util part3
* dont look at /tmp
* Remove max-depth
* Add disk usage stats to all non-windows platforms
* Disable Ubuntu quarantined test step
* Apply suggestions from code review
  - Make thingies worky on macOS
* Update .azure/pipelines/jobs/default-build.yml
* Undo skip of qurantined test run
* Update .azure/pipelines/jobs/default-build.yml
  - do not reference directory that doesn't exist
* Update .azure/pipelines/jobs/default-build.yml
  - reduce noise in Mac disk utilization output

Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>
2020-04-11 12:59:18 -07:00
Günther Foidl 810969084a
Replaced Span<T>.Fill(0) with Span<T>.Clear() (#20023) 2020-04-10 15:18:37 -05: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
Hao Kung 200f2c49be
Reenable sharedfx with arm64 queue skipped (#20659) 2020-04-09 12:24:03 -07:00
Javier Calvarro Nelson 5f7e1a0004
[Static web assets] Add comment about static web assets in CreateDefaultBuilder (#20653)
Updates the existing comment to indicate that we plug-in static web assets in development
2020-04-09 01:28:19 -07:00
Hao Kung 1bbca1502b
Revert "Reenable framework unit tests on helix (#19975)" (#20657)
This reverts commit 9a792f2a27.
2020-04-09 05:00:26 +00:00