Commit Graph

45021 Commits

Author SHA1 Message Date
Chris R 1c40548928 Add LoggingConnectionFilter. 2015-11-19 16:28:45 -08:00
Pavel Krymets f25aab8df7 React to hosting changes 2015-11-19 16:12:50 -08:00
Pranav K 6f5b20660e Skip tests that rely on back slashes as part separator on Linux
Fixes #191
2015-11-19 15:50:05 -08:00
Doug Bunting 79d74127b9 Add temporary workarounds for aspnet/External#50 and aspnet/Mvc#3587 2015-11-19 15:50:00 -08:00
Ben Adams 3c7431aa35 Change disconnect to abort cts 2015-11-19 23:25:31 +00:00
Ryan Nowak d6bda0ec11 CompilerCache should not compile multiple assemblies for the same page.
Fixes #3469
2015-11-19 15:12:15 -08:00
Hao Kung 620622f260 Include error_desc/error_uri as well for OAuth 2015-11-19 15:06:20 -08:00
Pranav K 36c744ff29 Use the new line character to check if the CodeWriter buffer ends in a line feed.
Fixes #577
2015-11-19 15:05:31 -08:00
Pavel Krymets 04c30c8bb7 Flow configuration via IHostingEnvironment 2015-11-19 14:18:45 -08:00
Ben Adams 58d8c851c5 Remove CreateLinkedTokenSource
Resolves  #407
2015-11-19 21:50:10 +00:00
Cesar Blum Silveira 307e020703 Don't crash the server if a connection filter throws synchronously. 2015-11-19 13:27:43 -08:00
Pavel Krymets 0249c6181c Fix functional unit test after hosting changes 2015-11-19 12:26:54 -08:00
John Luo 825f82d7e0 Reacting to ApplicationServices removal from HttpContext 2015-11-19 09:40:46 -08:00
John Luo 67aa2546a8 Removing ApplicationServices from HttpContext #466 2015-11-19 09:34:38 -08:00
Pranav K 155bde0fcf Pass in the area name instead of the view name to a parameter that
requires an area name.

Fixes #3556
2015-11-18 17:50:14 -08:00
Doug Bunting 95b3d2c1dd Address PR comments
- removed `isMainPage` parameter to `GetPage()` and `FindPage()`
2015-11-18 15:59:46 -08:00
Doug Bunting 3be6167aa0 Switch concepts from misnamed `isPartial` to `isMainPage`
- `true` has the opposite meaning now but most changes are due to new parameters names in `IViewEngine`
  - use name names in `Microsoft.AspNet.Mvc.ViewFound` and not found events
- remove `IRazorPage.IsPartial` and `RazorView.IsPartial`
  - remove `IsPartial` properties from `Microsoft.AspNet.Mvc.Razor.BeginInstrumentationContext` and end events
- add parameter checks to `RazorView` constructor; instances are not retrieved from DI

nits:
- remove unused `cacheKey` parameter from `RazorViewEngine.CreateCacheResult()`
- correct duplicate test names in `RazorPageTest`
  - also `...OnPageExecutionListenerContext` -> `...OnPageExecutionContext`
2015-11-18 15:59:37 -08:00
Doug Bunting cf30bb730f PR comments and some smallish cleanup
- `IRazorViewEngine.MakePathAbsolute()` -> `GetAbsolutePath()`
- set `IsPartial` on all `IRazorPage` instances
- improve consistency of methods in `HtmlHelperPartialExtensions`
  - a couple unnecessarily passed `htmlHelper.ViewData`
  - add missing tests of these extension methods
- restore parameter checks in `CompositeViewEngine`
- reduce `List<string>` and remove enumerator allocations in `CompositeViewEngine`

nits:
- correct a few comments
- use `<seealso/>`
2015-11-18 15:59:28 -08:00
Doug Bunting d1fe824b5d Improve `SearchLocations` handling
- do not blindly use `FindPage()` / `FindView()` result in `Exception.Message` or returned results
  - failure scenarios involve new `Any()` calls but rarely additional `List<string>()` allocations
- change `ViewEngine_ViewNotFound` resource to be consistent with similar errors
  - remove trailing period at end of searched locations list

nit: remove remaining `null` checks of `SearchedLocations` in not found cases; never `null` then
2015-11-18 15:59:20 -08:00
Doug Bunting 08dd77d8c7 Add relative view path support
- #3307
- relative paths are now supported in `View()` calls from components and view components,
  `Html.PartialAsync()` and similar calls, and `RazorPage.Layout` settings.
  - support absolute paths, relative paths, and view location lookups consistently / everywhere
  - support view paths in `TemplateRenderer` e.g. passing an absolute path to `Html.EditorFor()`
- take a big swing at the `IRazorViewEngine` and `IViewEngine` interfaces
  - split lookups (view names) from navigation (view paths)
  - remove `Partial` separation; use parameters to set `IsPartial` properties
- correct `ViewContext` copy constructor and add unit test
- extend unit tests to cover relative paths
  - fix existing tests to handle newly-required extension in an absolute path
- add functional test that chains relative paths

nits:
- remove some YOLO line wrapping
- `""` -> `string.Empty`
2015-11-18 15:59:11 -08:00
Pavel Krymets 7c8b37bcc7 Do not add IHttpContextAccessor to DI by default 2015-11-18 15:03:03 -08:00
Pavel Krymets 349b2f3963 Add HttpContextAccessor because Hostring doesn't do it by default 2015-11-18 14:44:35 -08:00
Chris R 2f2ca234a5 Enable detailed startup errors by default. 2015-11-18 14:01:40 -08:00
Ryan Nowak 42acfe43ad Fix aspnet/Mvc#3196 Razor Compilation Allocations
This change significantly reduces the amount of string and List<ISymbol>
allocations that occur during compilation by changing the way
LiteralChunks are combined.

This is a low impact fix that addresses the performance issue, the design
issues that caused it still exist.

The problem here lies in what Razor fundamentally does - it parses HTML/C#
into tokens, and then combines them back into 'chunks' a representation
friendly to code generation. When presenting with a large block of static
HTML, Razor parses it into individual HTML tokens, and then tries to join
them in back into a single chunk for rendering. Due to details of Razor's
representation of chunks/tokens, the process of combining literals is too
expensive.

Mainly, what's done here is to not try to combine instances of
LiteralChunk. The process of merging them is too expensive and requires
lots of interm List<ISymbol> and string allocations.

Instead we produce a new 'chunk' ParentLiteralChunk, which doesn't do so
much up-front computing. Various pieces of the code that deal with
LiteralChunk need to be updated to deal with ParentLiteralChunk also,
which is the bulk of the changes here.

Note that we still have the potential for LOH allocations to occur during
codegen, but it's likely to occur O(1) for each large block of HTML
instead of O(N) as it did in the old code.
2015-11-18 12:51:11 -08:00
Pavel Krymets 09f54d6857 Fix build 2015-11-18 12:38:28 -08:00
Pranav K 78e90d7f04 Update ifdefs from DNXCORE50 to DOTNET5_4
Fixes #467
2015-11-18 12:29:47 -08:00
Doug Bunting b3c68defe8 Change `IViewComponentHelper` methods to return `IHtmlContent`
- #3152
2015-11-18 12:21:39 -08:00
glennc 55692574b4 Missed saving the change to helloMVC. 2015-11-18 12:03:14 -08:00
Pavel Krymets c48173c948 Add event ids to all log calls 2015-11-18 11:36:15 -08:00
Pavel Krymets 8ee803d255 Handle Remote header with ip and port correctly 2015-11-18 11:10:27 -08:00
glennc 43076b8f95 Merge branch 'dev' of github.com:aspnet/Home into dev 2015-11-18 11:01:52 -08:00
glennc 2337043e92 change kestrel to listen on * 2015-11-18 11:01:37 -08:00
Master T 3c1b759750 Merge pull request #485 from tmds:dev
Convert Environment Ticks to TimeSpan Ticks
2015-11-18 10:57:05 -08:00
Kiran Challa 85080ae621 Make Cors filters run before any other authorization filters 2015-11-18 10:51:49 -08:00
ASP.NET Push Bot c4252f63f8 ⬆️ dnvm.ps1, dnvm.cmd, dnvm.sh
Source: aspnet/dnvm@c8894c5424
2015-11-18 10:47:18 -08:00
ASP.NET Push Bot 42c1c93fbd ⬆️ dnvm.ps1, dnvm.cmd, dnvm.sh
Source: aspnet/dnvm@c8894c5424
2015-11-18 10:42:15 -08:00
glennc a402095e59 Update dockerfiles 2015-11-18 10:25:02 -08:00
Kiran Challa f468d6789f Fixed doc comment 2015-11-18 10:07:05 -08:00
Brennan 0708c34331 Adding windows specific tests 2015-11-18 10:03:39 -08:00
Kiran Challa 982c7abea8 [Fixes #3503] Removing formatters on a given type only works on collections in MVC options 2015-11-18 09:56:44 -08:00
Ryan Nowak a65a6a7cab React to change in Razor 2015-11-18 09:53:24 -08:00
Ryan Nowak 5ce8740f70 Simplify ChunkTreeBuilder 2015-11-18 09:43:11 -08:00
Pavel Krymets 681533e06c Set IHttpContextAccessor only if DI provides it 2015-11-18 09:15:27 -08:00
Glenn Condron 02c4a35272 Update Dockerfile 2015-11-18 09:03:15 -08:00
Glenn Condron 96806ed284 Update Dockerfile 2015-11-18 09:02:37 -08:00
Damian Edwards 8c7e493785 Fix sample 2015-11-18 08:12:20 -08:00
Master T efec0feda2 Fix merge 2015-11-18 08:29:30 +01:00
Master T 2cdd659e67 Fix indentation 2015-11-18 05:11:57 +01:00
Master T 592d802fde Add test for https scheme, code cleanup 2015-11-18 05:06:30 +01:00
Master T 85eb6ab600 Code cleanup 2015-11-18 05:06:29 +01:00