Commit Graph

194 Commits

Author SHA1 Message Date
Pranav K c5a5ba1fee Add support for updateable ActionDescriptorCollection
Fixes #5350
2016-11-17 10:08:38 -08:00
Pranav K 1506a44cd5 Fix downgrade warnings 2016-11-10 09:22:11 -08:00
Pranav K b82969a557 Updating versions to 1.2.0-* 2016-11-09 14:18:46 -08:00
Jass Bagga 576c0e6a65 Throw an exception if configurationType to CreateConfigureDelegate is abstract/has no parameterless ctor
Addresses #5431
2016-11-08 14:16:03 -08:00
Marcus Schweda 24d5dfb552 Dynamic assembly checks to prevent NotSupprotedExceptions from System.Reflection.Emit
Fixes #5487
2016-11-07 12:49:49 -08:00
Jass Bagga 9caa688a30 Modified exception message for duplicate keys exception in CandidateResolver
Addresses #5289
2016-11-07 11:16:11 -08:00
Hugh Bellamy 1dc4b28bbe Add AcceptedAtActionResult tests 2016-11-07 09:53:19 -08:00
Kiran Challa 0cee00aae1 [Fixes #5352] When replacing Controller.Dispose with an explicit implementation the base Dispose is an action 2016-11-04 09:34:30 -07:00
Doug Bunting f04286562e Treat `ContentType==null` and `MediaType.GetEncoding(ContentType)==null` differently
- now, if client sends e.g. `Content-type: text/json;charset=[invalid]`, service will respond with HTTP/415
 - if client sends `Content-type: text/json`, service will still try UTF-8 (or updated default encoding)
 - intentional (and slight) behaviour change from 1ac7315
- include and a few new tests and some cleanup from same commit
2016-11-03 10:51:39 -07:00
Doug Bunting 116c927e61 Revert "Do not call `Encoding.GetEncoding()` with a string from the request"
- #5351 should be Won't Fix

This reverts commit 1ac731519a.
2016-11-03 10:51:39 -07:00
Jass Bagga 0eea3c2651 Log messages added to BodyModelBinder for input formatters (#5451)
Addresses #5367
2016-10-27 09:43:53 -07:00
Doug Bunting 1ac731519a Do not call `Encoding.GetEncoding()` with a string from the request
- #5351
- fix affects only `TextInputFormatter`
 - `TextOutputFormatter` already does the Right Thing™️ with `Accept-Charset` headers
 - `ResponseContentTypeHelper` uses `Encoding.GetEncoding()` but is not passed request data
2016-10-24 14:59:49 -07:00
Ryan Brandenburg 60c59b576e Replace HashSet with a Hybrid HashSet/List
to improve performance on less nested models
2016-10-24 14:47:49 -07:00
Doug Bunting 3fdcaecaa8 Correctly handle quoted media type parameter values
- #5349
- fix or add comments about other parsing errors and inconsistencies
 - `MediaType` did not skip whitespace before the type

nits:
- use `+=`
- `<code>` -> `<c>` since the former is not for use within a paragraph
- split tests up to remove `bool expectedResult` parameters
2016-10-24 13:16:09 -07:00
Jass Bagga 79e576b86c ProducesResponseTypeAttribute(int statusCode) ctor added
Addresses #4863
2016-10-19 17:08:06 -07:00
jacalvar d5b0ebd10c Merge branch 'rel/1.1.0-preview1' into dev 2016-10-18 14:26:12 -07:00
jacalvar 9579806306 [Fixes #5150] parsing issue on asp.net when request quality factor is specified 2016-10-18 12:52:53 -07:00
joheredi 38aa48651f Fix for Issue#5150 2016-10-18 12:52:30 -07:00
John Luo d8c6c4ab34 Add support for VaryByQueryKey #2894 2016-10-18 12:31:04 -07:00
Jaspreet Bagga c2fee4d74d AcceptedResult(), AcceptedAtActionResult(), AcceptedAtRouteResult() support
Addresses #4937
2016-10-18 09:48:26 -07:00
Pranav K a52d692de0 Updating to netcoreapp1.1 2016-10-13 11:21:09 -07:00
Pranav K ed1378a365 Revert "Updating to netcoreapp1.1"
This reverts commit 398a104810.
2016-10-12 16:09:12 -07:00
Pranav K 398a104810 Updating to netcoreapp1.1 2016-10-12 14:24:52 -07:00
Kiran Challa d09e921c4a Check for default constructor in ComplexTypeModelBinderProvider 2016-10-07 16:46:13 -07:00
Kiran Challa e7fe635dab Modified FormCollectionModelBinderProvider to throw when binding for FormCollection model type.
[Fixes #4895] No parameterless Constructor defined
2016-10-07 16:46:11 -07:00
Pranav K 6fe683c585 Add Microsoft.DotNet.InternalAbstractions to fix tests 2016-10-04 10:11:09 -07:00
Pranav K 6d235e4ef5 Update partner package versions 2016-10-03 14:27:20 -07:00
Doug Bunting 4cca6b09f0 Reduce allocations during HTML generation
- #3918
- precompute size of `StringBuilder` in `ExpressionHelper`
- reduce `string` allocations in `ViewDataEvaluator`
 - also get rid of `Enumeration` state machines
- reduce the size of a few objects; use more expression-valued properties
 - e.g. don't store `_modelType` in `ModelExplorer`
- add `EmptyArray<TElement>`; make empty arrays consistently `static`
- avoid `string.Split()` in HTML and tag helpers

nits:
- make `ExpressionHelperTest` tests more stringent
- correct `Message` for an `ArgumentNullException`
- remove excess `using`s in classes I touched (but often ended up leaving otherwise unchanged)
- improve doc comments
- remove `ToString()` call on a `string`
- avoid encoding `string.Empty`
- fix test file name
- remove useless variables
- correct spelling
- improve whitespace
2016-10-03 12:17:47 -07:00
Doug Bunting 9c6c8410e2 Get rid of some duplicate test data
- remove a few warnings from output when testing in VS
2016-09-21 14:52:52 -07:00
Kiran Challa 01f7ecd9d9 [Fixes #5154] Stream should be suppressed from model metadata validation 2016-09-19 11:10:03 -07:00
Pranav K a480378a44 Make AuthorizeFilter constructable
* Make AuthorizeFilter constructable

Fixes #5253
2016-09-14 13:43:56 -07:00
Ajay Bhargav Baaskaran 4677bf13fa Reverting accidental changes 2016-09-08 08:28:51 -07:00
Crystal Qian 05392cbf35 Added view component tag helper code generator. (#5195)
This addresses #1051. There is one more pull request that needs to be completed/merged (for `CompositeTagHelperDescriptorResolver` and friends). After that, runtime should work!
2016-09-07 20:30:09 -04:00
Doug Bunting fae0e9a66e Handle `!ConvertEmptyStringToNull` cases correctly in `SimpleTypeModelBinder`
- #4988
- preserve whitespace as the setting demands
 - correct previous `string.IsNullOrEmpty()` call to match previous `ValueProviderResultExtensions.ConvertTo()` use
- short-circuit other `string`-to-`string` conversions (as `ValueProviderResultExtensions.ConvertTo()` does)
- correct documentation of `ConvertEmptyStringToNull` properties
- add more tests of these scenarios and remove duplicate `BindModel_ValidValueProviderResult_ConvertEmptyStringsToNull()` test
2016-09-02 16:15:18 -07:00
Kiran Challa f7ee16170c [Fixes #5161] Support running middleware pipeline as part of a resource filter 2016-08-30 09:26:04 -07:00
Ajay Bhargav Baaskaran 9ed753288f [Fixes #5170] Fixed KeyNotFoundException in UrlHelperFactory.GetUrlHelper() 2016-08-26 11:27:02 -07:00
Nate McMaster 3aa6d739ce
Fix broken test caused by logging change aspnet/Logging#480 2016-08-26 10:59:30 -07:00
Kiran Challa ece8f33a65 [Fixes #5175] Async resource filters' short circuited result getting executed more than once. 2016-08-25 16:30:41 -07:00
Kiran Challa a4ec3bb24a [Fixes #4991] Misleading MissingMethodException message for incorrect routes 2016-08-11 11:57:21 -07:00
Pranav K 67dce322df Updating to Moq \ Castle.Core that does not require imports 2016-08-08 12:20:14 -07:00
ivano 6e5187c1ae Using new StringRouteConstraint for area constraint 2016-08-08 08:47:04 -07:00
Kiran Challa ac98417398 ModelBinding: Remove IsReadOnly checks and add/update tests 2016-08-04 14:20:23 -07:00
ivano scifoni be5deef584 Created option for RequireHttpsAttribute.Permanent
Fixes #4650
2016-08-04 11:43:16 -07:00
jacalvar b56cab6414 Merge branch 'rel/1.0.1' into dev 2016-08-01 14:16:58 -07:00
jacalvar f0732e9e21 [Fixes #5038] HTTP Verbs mapping error GET and DELETE
When an action contained an attribute derived from HttpMethodAttribute,
doesn't specify an attribute route and there is also another attribute
extending HttpMethodAttribute that has a route defined on it; we ignored
the HttpMethodAttribute attribute without a defined route when building
the set of action selectors for the method.

This caused the resulting action to be unbounded and to accept requests
for other verbs not associated with it. The root cause of the problem was
that attributes override equality and do a field by field comparison but
ignore fields in the base classes of the type, so if an attribute is part
of a class hierarchy (like Http*Attributes) there might be two different
attributes that get considered equal.

The fix for the problem has been to change using Contains on a couple of
collections (that uses the equals method on the underlying object) and
check for the existence of the attribute on the collection directly by
using reference equality.
2016-08-01 12:49:23 -07:00
Ryan Nowak e77dc3af6a Implement manual state machine 2016-08-01 10:38:46 -07:00
Ryan Brandenburg 27a641f4bf Only create filters for models that need them (#5044) 2016-07-27 16:36:26 -07:00
jacalvar 7a3f24d49d [Fixes #4960] Action results returned from controller actions rendered as json instead of executed 2016-07-27 14:42:46 -07:00
BrennanConroy 0a5f8e013e AppDomain safety 2016-07-27 09:26:06 -07:00
Pranav K 5092e75387 Pin repo version to 1.0.1 2016-07-26 12:09:57 -07:00