Commit Graph

251 Commits

Author SHA1 Message Date
Kiran Challa 4dcde8a329 Added Base64UrlTextEncoder utility from Security repo 2016-11-01 15:31:39 -07:00
Pranav K cdbd9ffa74 Updating to netcoreapp1.1 2016-10-13 11:18:10 -07:00
Pranav K 11a67b8f55 Revert "Updating to netcoreapp1.1"
This reverts commit 6d5cd28e9b.
2016-10-12 16:08:46 -07:00
Pranav K 6d5cd28e9b Updating to netcoreapp1.1 2016-10-12 13:45:30 -07:00
Ben Adams 4569653504 Don't allocate for ResponseCookiesFeature 2016-10-07 10:01:42 -07:00
Kristian Hellang 063d6eca0f Added custom RFC 1123 DateTimeFormatter to improve allocation profile (#716) 2016-10-05 12:19:15 -07:00
Pranav K 874dcebbcb Updating partner package versions 2016-09-28 11:50:48 -07:00
Mikael Mengistu 35cde79e46 Renamed HttpMethod class to HttpMethods to avoid conflicts 2016-09-27 14:26:36 -07:00
Mikael Mengistu 626332c5db Adding HTTP method constants 2016-09-26 23:09:08 -07:00
David Fowler 87cd79d6fc Added decoding tests for the FormReader
- This is the first step in work to remove
char[] allocations from the FormReader
2016-09-08 09:57:58 -07:00
John Luo e4afd782e8 Add strong and weak ETag comparisons 2016-08-30 14:15:16 -07:00
John Luo e2a0e887af Add UsePathBase middleware 2016-08-16 16:18:36 -07:00
Justin Kotalik a4a4e490c5 Addresses #678 and #679 2016-08-03 22:31:42 -07:00
BrennanConroy 9a0ea424ea Fix cross appdomain exception 2016-07-25 09:48:10 -07:00
Kiran Challa c5e09b0344 Added a HttpResponseStreamWriter test for surrogate pairs 2016-07-18 14:11:42 -07:00
Doug Bunting 9a28932b7a To de-dupe, we must remove (again)
- part of aspnet/Common#93
- use `WebEncoders` from Common repo
- leave some of `WebEncodersTests` to ensure resources are brought in correctly
2016-07-12 16:25:53 -07:00
Troy Dai 150b4708f1 Fix PathString over-encoding
Base on RFC 3986, ensure following characters are not encoded

alpha, digit, "-", "_", ".", "~", "@", ":", "/", "!", "$", ";", "=",
"'", "(", ")", "*", "+", ","
2016-07-08 15:54:46 -07:00
Doug Bunting 748e96f513 One build to rule them all
- well, at least VS and command-line builds will share output
- part of aspnet/Coherence-Signed#277
2016-07-07 12:01:29 -07:00
Derek Gray 59b605cafb Add UseWhenExtensions and UseWhenExtensionsTests 2016-07-05 11:54:23 -07:00
Pranav K 62eaf16585 Updating to RTM builds of xunit 2016-07-01 11:21:28 -07:00
John Luo 4986137ffe Use filename* for files in multipart forms when available #651 2016-06-29 12:31:52 -07:00
Chris R 3c0c02112d #659 Parse headers with consecutive commas 2016-06-23 14:22:23 -07:00
Pranav K 20d608170e Updating to dev versions 2016-06-16 10:17:59 -07:00
Justin Kotalik d71c2cb6ce Adds Refactor to Equals in Path String, Adds Regression Tests 2016-06-15 16:32:03 -07:00
N. Taylor Mullen 54bdd47763 Remove direct Microsoft.NETCore.Platforms dependency.
- Microsoft.NETCore.App now pulls this package in.

aspnet/Coherence-Signed#344
2016-06-13 15:28:32 -07:00
Chris R 3fc1fef2be #573 Rename UriHelper.Encode 2016-06-06 13:30:07 -07:00
Pavel Krymets 8b3c308c22 Limit value number instead of key number in form reader 2016-06-01 15:46:40 -07:00
Pavel Krymets c63f02c19f Optimize form reader allocations 2016-05-27 08:14:47 -07:00
moozzyk e854d3aa9a Allow query string parameters without values
Addresses #624
2016-05-23 15:41:37 -07:00
John Luo 6d91a160b6 Add IsAvailable property to ISession #634 2016-05-23 10:08:05 -07:00
Pranav K a4bd3bc895 Merge branch 'release' into dev 2016-05-02 14:56:19 -07:00
Chris R 5767306875 #547 Remove '+' replacement from request cookies. 2016-05-02 14:44:26 -07:00
Pranav K edff60f293 Fix build warnings 2016-05-02 11:27:17 -07:00
Chris R 3e69df87f8 Merge branch 'release' into dev 2016-04-25 12:00:37 -07:00
Chris R 13f73c6101 Make the form body limits configurable. 2016-04-25 11:59:40 -07:00
Pranav K 391db10384 Merge branch 'release' into dev 2016-04-19 14:54:03 -07:00
Pranav K f429cd262b Use latest build of dotnet-test-xunit 2016-04-19 14:54:02 -07:00
Pavel Krymets 8fe7a17dab Merge branch 'release' into dev 2016-04-18 16:52:09 -07:00
Pavel Krymets 87b8d478e0 Bring Microsoft.NETCore.Platforms dependency back 2016-04-18 16:52:06 -07:00
Pavel Krymets ed391a961a Merge branch 'release' into dev 2016-04-14 14:44:03 -07:00
Pavel Krymets 440b8bc0ba Migrate tests, tools and samples to portable 2016-04-14 14:34:51 -07:00
Chris R e07008ddec Prevent double flush in HttpResponseStreamWriter. 2016-04-06 12:08:20 -07:00
Chris R 8196f2ab81 #605 Fix regressions in FormReader / FileBufferingReadStream. 2016-04-01 11:34:45 -07:00
Doug Bunting 6725d68559 Move some implementations (all feature implementations) out of `.Internal` namespaces
- #549, #592
- move feature implementations to `Microsoft.AspNetCore.Http.Features` and `...Authentication.Features`
- move `DefaultHttpContext`, `HttpContextAccessor`, `HttpContextFactory`, `FormCollection` and
  `HeaderDictionary` to `Microsoft.AspNetCore.Http`
- move `FormFile` to `Microsoft.AspNetCore.Http.Internal`
 - that and `Microsoft.AspNetCore.Http.Authentication.Internal` are the remaining `.Internal` namespaces

nits:
- remove a couple of parameterless constructors
- add / fill subfolders to align with new namespaces
- remove all use of (unnecessary) "T:..." `<see cref=""/>` values
2016-03-30 16:01:37 -07:00
Doug Bunting 80813f7c1e Use pooled `StringBuilder` to reduce allocations when adding response cookies
- #561
- new `SetCookieHeaderValue.AppendToStringBuilder()` method; avoids per-call `StringBuilder` allocation
- `ResponseCookies` uses `ObjectPool<StringBuilder>` that `ResponseCookiesFeature` provides
 - `ResponseCookies` works fine if no `ObjectPoolProvider` is available
- `IHttpContextFactory` instance is a singleton instantiated from CI
 - make `HttpContextFactory` `ObjectPoolProvider` and `ResponseCookiesFeature`-aware
 - apply same pattern to sample `PooledHttpContextFactory`
- pool is not currently configurable; defaults are fine for response cookies
 - if we need (policy) configuration, would add an `IOptions<HttpContextFactorySettings>`

nit: Add some doc comments
2016-03-25 09:38:52 -07:00
David Fowler 8efc650e74 Fixed build 2016-03-25 01:54:05 -07:00
Doug Bunting 6f24508a33 Move remaining feature interfaces into `Microsoft.AspNetCore.Http.Features` package and namespace
- #590, also related to #561
- move feature interfaces from `Microsoft.AspNetCore.Http` package
- move required classes from `Microsoft.AspNetCore.Http.Abstractions` package
- move `ISession` and `WebSocketAcceptContext` to `Microsoft.AspNetCore.Http` namespace (#590)

nit: remove transient dependencies listed in `Microsoft.AspNetCore.Http.Abstractions`'s `project.json`
2016-03-21 09:05:09 -07:00
Chris R ce408a999e #578 Do not buffer the request body by default when reading forms. 2016-03-17 15:21:10 -07:00
Chris R 1f754f65d3 Add ISession.Id 2016-03-04 14:28:20 -08:00
David Obando 15649b7e31 Faster SubMatch implementation
Submatch has been sped up by implementing a modified Boyer–Moore–Horspool algorithm with an average-case complexity of O(N) on random text. Worst case, it behaves similarly to the previous implementation O(MN), where M is the length of the boundary and N is the length of the buffer to operate on.

Method SubMatch looks for two things:

  1. Whether the byte array segment fully contains the boundary, or
  2. Whether the byte array ends with the start of the boundary.

Case 1 is now a lot faster than the previous implementation. Case 2 remains using the same code as before. The method will do Case 1 until the matchOffset is equal to N-M. It then switches to Case 2, unless a match is found.

The code can be further sped up with a full Boyer–Moore implementation, or something more sophisticated. This however can be evaluated in the case that this implementation is insufficiently performant for our main scenarios.

This commit resolves issue #575.
2016-03-04 10:54:20 -08:00