Commit Graph

396 Commits

Author SHA1 Message Date
Ryan Nowak 52cfdf75f2 Add AppendEncoded to the builder
This is needed because a builder may have an optimized path for an
unencoded string. There's also no 'common' encoded string implementation
so it's much more straightforward to put this on the interface.
2015-09-14 11:58:38 -07:00
David Fowler 7a24045953 Split ParsingHelpers classes into their own files
#397
2015-09-13 22:07:17 -07:00
Ryan Nowak ed3ea33918 Add IHtmlContentBuilder interface
Common interface for things that allow appending content (TagBuilder,
BufferedHtmlContent). We want to be able to expose this from APIs for
users to add content.

See discussion: https://github.com/aspnet/Mvc/issues/3087
2015-09-10 18:41:17 -07:00
Pranav K b1a2db0a7c Adding NeutralResourcesLanguageAttribute 2015-09-10 17:48:17 -07:00
Chris R 327dabb243 Fix namespace for Clear extension. 2015-09-10 11:35:22 -07:00
Chris R 00d5a056d9 #360 Add Response.Clear() extension. 2015-09-10 11:30:42 -07:00
Justin Van Patten df33a3cff8 StringValues improvements
- Add public struct enumerator (avoids enumerator allocations)
 - Implement IReadOnlyList<string>
 - Rename indexer parameter name from "key" to "index"
 - Faster IndexOf (no more enumerator allocation & faster array enumeration)
 - Faster Contains (no more box allocation)
 - Faster CopyTo (no more enumerator allocation)
 - Faster Concat (no more enumerator allocations; use CopyTo)
2015-09-09 09:17:06 -07:00
Chris R 4e0f0c79ec #366 Rewind the request buffer after parsing the form. 2015-09-08 12:04:53 -07:00
Levi B 43d0b0f65b Update WebEncoders from Unicode 7.0 to Unicode 8.0
Add "how to update" file detailing update steps
2015-09-05 17:32:27 -07:00
Hao Kung f3e828892d React to options 2015-09-02 13:46:52 -07:00
Chris R c3290a029f Change IApplicationBuilder.Server to IFeatureCollection ServerFeatures. 2015-08-31 16:48:50 -07:00
Chris R e45e70da01 #367 Remove HttpContext.Get/SetFeature. Take 2. 2015-08-31 16:41:27 -07:00
Chris R f475e53ad2 #367 Add HttpContext.Features, move Get/SetFeature. Take 1. 2015-08-30 21:55:22 -07:00
Chris R 59b44a4c24 Move *CommaSeperatedValues APIs from IHeaderDictionary to extension. 2015-08-28 12:11:14 -07:00
Chris R 456277fe1d #361 Introduce StringValues to replace string[] usage. 2015-08-28 12:11:13 -07:00
Ryan Nowak 15687ab80a Fix #343 - Avoid going to disk when reading the form
This change tries to avoid looking up the TEMP directory for most reads of
the form data. We'll now only hit the disk when necessary.
2015-08-28 09:41:12 -07:00
Ryan Nowak 516a435ea5 Fix #365 - Make IFormFileCollection implmenent IReadOnlyList<T> 2015-08-21 10:39:27 -07:00
Kristian Hellang 138bc6a20f Added owin.RequestUser 2015-08-21 09:38:53 +02:00
Troy Dai e4722b0bef Update packages' versions 2015-08-17 11:11:16 -07:00
Hao Kung 8487e42a68 Hello HttpContextAccessor 2015-08-12 13:08:58 -07:00
Hao Kung 67803d2f41 Challenge now always checks for accept 2015-08-11 16:15:48 -07:00
Pranav K 4576481a32 Reacting to DI changes 2015-08-11 12:57:06 -07:00
Troy Dai 3cd5907fc5 Update CoreCLR versions 2015-08-05 09:33:00 -07:00
Chris R 9c3a39123a #341 Add HttpReqeuest GetEncodedUrl and GetDecodedUrl extensions. 2015-08-04 10:09:39 -07:00
Chris R ac945a0bcf #339 Reduce IFeatureCollection surface area. 2015-08-03 14:55:25 -07:00
sornaks 5d7ec0e2c6 Changing QueryHelpers.AddQueryString to use Array instead of List. 2015-08-03 11:08:54 -07:00
Chris R b8af07e3c1 #60 Merge FeatureModel into Http.Features. Remove unused FeatureObject. 2015-07-16 15:10:48 -07:00
Hao Kung d142160f47 OnCompletedDispose => RegisterForDispose 2015-07-13 12:23:03 -07:00
sornaks 25ea93de9e Making QueryHelpers.AddQueryString support # in the URL. 2015-07-09 16:08:45 -07:00
sornaks 24f90cc914 Introducing IHtmlContent - an interface which lets any content define how to write itself. 2015-07-09 15:01:36 -07:00
Chris R 534becad6b #182 Move StatusCodes from WebUtilities to Http.Abstractions. 2015-07-08 09:55:32 -07:00
Victor Hurdugaci bbbd0d9f35 Add repository information to project files 2015-07-01 20:02:24 -07:00
Chris R 40719b37f6 #177 Enable Copy to return non-read-only. 2015-06-26 14:34:22 -07:00
Hao Kung 5fe8037281 Auth API changes (Async, ChallengeBehavior) 2015-06-25 17:03:10 -07:00
Chris R 641a7fb82b Correct exception type. 2015-06-25 12:20:53 -07:00
Hisham Abdullah Bin Ateya eb423e57d6 Using 'nameof' operator instead of magic strings
Fix back-end field issue

Fix back-end field issue
2015-06-25 12:17:17 -07:00
Chris R 652d885402 #177 Immutable HeaderValue objects. 2015-06-25 09:34:14 -07:00
Mikael Mengistu 12b78a31bf Added more tests and error handling for construction of middleware classes #236 2015-06-24 10:03:56 -07:00
Chris R af6a17710b #310 Refactor IRequestIdentifierFeature. 2015-06-16 16:26:37 -07:00
Chris R a79b05bf24 #320 Rename OnSendingHeaders to OnResponseStarting and HeadersSent to HasStarted. 2015-06-12 12:59:07 -07:00
Henk Mollema 40cfc238fe Use nameof operator 2015-06-11 09:28:05 +02:00
Kiran Challa 6407a1672d Session API review changes. 2015-06-03 21:51:17 -07:00
David Fowler ed339a35d2 Made container verison volatile 2015-05-29 14:14:36 -07:00
David Fowler d9839bcc43 Removed bookeeping for duck typing feature interfaces
- Removed interlocked increment since the version was
being incremented within the lock

#317
2015-05-29 01:12:54 -07:00
David Fowler eb182fdafd Fixed dependencies 2015-05-21 03:46:18 -07:00
Chris R 69849cc37c #311 Move UseMiddleware to Http.Abstractions. 2015-05-20 12:42:54 -07:00
David Fowler 83a8fd136f Fix tabs 2015-05-17 09:07:21 -07:00
Pranav K 7b9cb14a10 Revert "React to CoreCLR dependency changes."
This reverts commit 06d3333ed3.
2015-05-15 12:20:28 -07:00
Chris R 06d3333ed3 React to CoreCLR dependency changes. 2015-05-15 09:59:42 -07:00
Chris R 99ea4fed8a #176 Add Clone() to MediaTypeHeaderValue and NameValueHeaderValue. 2015-05-14 22:23:12 -07:00
Chris R dce1d0e88f #272 Make more properties settable (Items, RequestAborted, IsHttps, Query, Cookies). 2015-05-12 11:02:58 -07:00
Chris R eb0fe6a92a #281 Reorganise files, namespaces for internal and features. 2015-05-07 13:15:14 -07:00
Chris R 550b2252ea #265 Remove Use extensions that take services. 2015-05-07 13:15:11 -07:00
Troy Dai f7f4d490aa React to common package name change 2015-05-07 09:37:58 -07:00
Chris R c9c09fb4e5 #269 Clean up QueryString APIs, add tests. 2015-05-06 10:55:20 -07:00
Chris R 568d0d9106 #275 Reduce UriHelper to static methods. 2015-05-04 10:30:14 -07:00
N. Taylor Mullen 8703e2d7f2 Update LICENSE.txt and license header on files. 2015-05-01 13:52:04 -07:00
Kiran Challa 602f638a8c Remove EncoderServices and add default services directly in the service collection extension 2015-04-30 13:21:14 -07:00
Brennan 89ccdf56bf React to interface renames 2015-04-30 08:45:24 -07:00
Chris R 5bce140681 #295 Rename Core->Abstractions and Interfaces->Features. 2015-04-29 14:38:26 -07:00
Chris R 06584a31b4 #276 Remove unused IHttpApplicationFeature. 2015-04-29 09:59:29 -07:00
Chris R 86f94b7590 Fix typo. 2015-04-28 13:44:40 -07:00
Chris R 117486de94 #277 Rename IHttpClientCertificateFeature. #279 prefer X509Certificate2. 2015-04-27 14:18:02 -07:00
Chris Ross 43a38c1b58 Reorder Challenge parameters. 2015-04-24 08:51:30 -07:00
Chris Ross 06e24a8fdf Handle null auth, null descriptions. 2015-04-23 16:05:05 -07:00
Chris Ross 0ed2692ef4 #267, #273, Move WebSocket APIs to their own object, fix context object. 2015-04-23 15:16:26 -07:00
Chris Ross cc1a24b949 #273 - Use POCOs for auth context objects. 2015-04-23 15:16:23 -07:00
Chris Ross a174bb299e #270 Rename auth wrapper's internal collections to Items. 2015-04-23 15:15:03 -07:00
Chris Ross 4637a95157 #266 Consolidate authentication APIs. 2015-04-23 15:15:02 -07:00
Chris Ross 25aed6f88e #274 Reorganize the strong header type extensions. Remove SendAsync extensions. 2015-04-22 11:43:12 -07:00
Chris Ross 65e57d28f3 Add PathString+string operator to prevent too much string<->PathString implicit conversion. 2015-04-21 11:08:54 -07:00
Chris Ross 86bd393d3d Add string+PathString operator to prevent too much string<->PathString implicit conversion. 2015-04-21 10:23:22 -07:00
Chris Ross 0737ea392f Add NotNull to Predicate setter. 2015-04-20 11:41:43 -07:00
Chris Ross 4030be585d #265 Add implicit converters between string and PathString. 2015-04-20 10:54:33 -07:00
Chris Ross 7d7cd5fde7 #265 Remove some overloads for Run, Map, and MapWhen. 2015-04-17 12:28:02 -07:00
Chris Ross 43c3913b86 #265 Remove setters for IApplcationBuilder.Properties and Server. 2015-04-17 12:18:09 -07:00
Justin Van Patten f5267fc145 Rename SetInt & GetInt -> SetInt32 & GetInt32
Fixes #256
2015-04-16 18:23:30 -07:00
Chris Ross d111e24da7 #190 - Swap Http and Http.Core package names. Remove Http.Core namespace. 2015-04-16 12:07:50 -07:00
Chris Ross 22a1cab976 #149 - Expose connection information as 1st class. 2015-04-16 11:41:41 -07:00
Hao Kung c69c289abf Simplify Challenge flow 2015-04-15 11:15:40 -07:00
Chris Ross e818783ba4 #167: Update cookie APIs to use shared core. 2015-04-15 09:37:47 -07:00
Chris Ross 09d6ab03bc Re-use public constants for header names. 2015-04-15 09:33:35 -07:00
Ryan Meyer 03c47ad582 Spelling mistake.
Sorry I was looking at this code trying to track down a bug somewhere else and noticed a spelling mistake for a local variable. I know I tend to be anal about spelling, so figured I'd at least point it out.
2015-04-10 16:05:44 -07:00
Chris Ross 58f759ac25 Move IServerInformation to Hosting. 2015-04-10 09:58:57 -07:00
Victor Hurdugaci fab55afca5 Update resource names 2015-04-08 15:31:44 -07:00
Chris Ross 043b0f204c Replace WebSocket dependency. Remove chained dependencies. 2015-04-08 14:23:15 -07:00
N. Taylor Mullen 4538519607 Merge branch 'release' into dev 2015-04-07 14:46:00 -07:00
N. Taylor Mullen e2e14681d1 Add serviceable attribute to projects.
aspnet/DNX#1600
2015-04-07 14:45:42 -07:00
Levi B 6c9055cadc Fix CJK Ideographs and Hangul Syllables representation
Characters in these blocks weren't correctly identified as assigned characters, which caused the encoders to always encode them, even if the ranges were in the allow list.
2015-04-07 13:54:46 -07:00
Chris Ross 31dae81405 Short circuit empty inputs. 2015-04-06 11:56:27 -07:00
Doug Bunting c6bf89a04e Update .xproj files for Microsoft.Web.AspNet.* -> Microsoft.DNX.* rename 2015-04-02 13:49:26 -07:00
Levi B 1e9d57f80c UrlEncoder should always encode the U+003A COLON character
Provides extra defense-in-depth in case an application is using this API to encode a relative URL, otherwise the part before the colon could inadvertently be treated as a scheme.
2015-03-17 17:19:20 -07:00
Ajay Bhargav Baaskaran f63702754f [Fixes #160] Added OnResponseCompleted to HttpResponse 2015-03-16 15:50:58 -07:00
Hao Kung 08ddbe8531 Auth cleanup
- Rename Security folder -> Authentication
- Change Authenticate to only take one scheme to match other APIs, the
params overload did not make it any cleaner to consume (since it didn't
produce a combined ClaimsPrincipal anyways)
2015-03-16 14:26:46 -07:00
Praburaj 93deb0b440 Remove dependency on DependencyInjection and instead use DependencyInjection.Interfaces on Http.Extensions
Fixes: https://github.com/aspnet/HttpAbstractions/issues/228
2015-03-13 19:56:45 -07:00
Praburaj b77e9d2d9c Using [NotNull] attribute from the Common repo package 2015-03-13 17:44:51 -07:00
Praburaj ca07b6e2fd Using new encoders over the old encoders. 2015-03-13 12:50:49 -07:00
Levi B 8ca2728ef8 Split encoders into two packages to resolve layering issues
The core package has no external dependencies aside from NetFX-produced packages
2015-03-12 22:35:47 -07:00
N. Taylor Mullen 12f90869c0 Update .kproj => .xproj. 2015-03-11 14:07:45 -07:00
Praburaj a6670114b1 Adding more fallbacks for BufferingHelper temporary folder location
Fixes:
https://github.com/aspnet/HttpAbstractions/issues/168
2015-03-10 21:20:50 -07:00
Levi B 543e0f4863 Code comment cleanup. 2015-03-10 18:06:59 -07:00
Levi B 332900b175 Allow XyzEncoder.Default to be settable. 2015-03-10 17:58:17 -07:00
Levi B ae456401a8 Change AllowedCharsBitmap back to a struct.
I also experimented with having a fixed uint[] field inside the struct, but this actually ended up having worse performance than a proper uint[] array reference since it defeated some of the JITter's optimizations.
2015-03-10 17:58:10 -07:00
Levi B 64077026c7 API cleanup: Rename UnicodeBlock -> UnicodeRange
Also clean up related doc comments
2015-03-10 17:58:03 -07:00
Praburaj 58c45cd379 SignOutContext needs AuthenticationProperties 2015-03-09 19:37:38 -07:00
Praburaj 9463b08d7b Move SendFile HttpResponse extensions to Microsoft.AspNet.Http.Extensions
Addresses: https://github.com/aspnet/HttpAbstractions/issues/221
2015-03-09 15:05:16 -07:00
N. Taylor Mullen 973bf7865e Remove BOM from project.json, *.cmd, *.sh and *.shade files. 2015-03-09 12:54:49 -07:00
N. Taylor Mullen de25ccc9cd Temporarily update struct => class.
- Will be reverted back as denoted by issue: https://github.com/aspnet/HttpAbstractions/issues/222
2015-03-09 01:32:04 -07:00
N. Taylor Mullen 0ad48b90b2 Update aspnet50/aspnetcore50 => dnx451/dnxcore50. 2015-03-08 12:50:39 -07:00
Levi B 9988d5205e GetXyzEncoder() shouldn't throw if IServiceProvider is null
Also remove dependency on full DI; use Interfaces instead
2015-03-05 18:43:59 -08:00
Praburaj d5e1b198dc Rename Microsoft.AspNet.Http.Interfaces => Microsoft.AspNet.Http 2015-03-05 16:54:21 -08:00
Brennan 09ccc84a17 DI API changes 2015-03-05 14:29:22 -08:00
Hao Kung 20848da93f React to DI changes 2015-03-04 18:08:36 -08:00
Praburaj ae23f7c7bc Adding a feature to get the traceidentifier for a request
Addresses : https://github.com/aspnet/HttpAbstractions/issues/117

Related changes in Helios & weblistener in separate PRs.
2015-03-04 14:18:51 -08:00
Hao Kung de1e8763dd Security -> Authentication
AuthN renames and design changes
2015-03-02 15:25:52 -08:00
Anthony W. Juckel ba2c06072e Remove space from ISignOutContext filename 2015-02-28 01:20:25 -06:00
Levi B 04707ccaa0 Add unit tests for the service provider extensions 2015-02-27 14:44:12 -08:00
Levi B a1dbce9065 Rename AddEncoders -> AddWebEncoders 2015-02-27 12:55:55 -08:00
Levi B eb42bc51fb CodePointFilter parameterless ctor should be empty, not Basic Latin 2015-02-27 11:30:01 -08:00
Levi B 0ca24147a0 Add unit tests and code generation routines 2015-02-27 11:30:00 -08:00
Levi B c5dc9abff6 Doc comment cleanup, API refactorings
Rename CodePointFilters -> UnicodeBlocks
Rework allowed / disallowed code point APIs for ease of use
Move service registration APIs into WebEncoders project
2015-02-25 14:01:17 -08:00
Levi B 204fb08e01 Refactor Encoders into their own package 2015-02-23 13:49:51 -08:00
Levi B 8d98d76209 Code comment clarifications 2015-02-19 14:42:20 -08:00
Levi B c551ec2490 Add encoder extension methods 2015-02-19 14:14:04 -08:00
Levi B fa18a8fb30 Rename HttpRequest.IsSecure -> HttpRequest.IsHttps 2015-02-17 10:50:07 -08:00
Levi B 3f9423eda9 Provide a facility for registering encoder services 2015-02-16 17:08:15 -08:00
Levi B fc52487294 Encoders should forbid Zs (space separator) characters except U+0020 SPACE 2015-02-13 14:12:40 -08:00
Levi B 0dd3a49463 Perf: Eliminate chatty virtual dispatches
This gives a speedup of approx. 20% (for overloads which take TextWriter) to 40% (for overloads which don't take TextWriter) for inputs in which at least one character requires encoding.
2015-02-12 11:44:11 -08:00
Pranav K 26cd8d51b6 Removing ANIs 2015-02-12 09:07:47 -08:00
Levi B e5c6fd401f Add TextWriter-based overloads to the encoding routines
These make the core implementations slightly slower but
provide the benefit of reducing allocations, which is
useful when these methods are called frequently by Razor.
2015-02-11 17:49:37 -08:00
Levi B 14c872d981 Update HtmlEncoder to wrap UnicodeEncoderBase 2015-02-11 12:03:47 -08:00
Levi B fc7ed3a9cd Add TLS token binding feature 2015-02-11 11:40:40 -08:00
Levi B 1008e17259 Add HtmlEncoder, UrlEncoder, and JavaScriptStringEncoder
Also add interfaces for abstracting each of these
Unit tests are not in yet but are coming soon
2015-02-11 11:39:22 -08:00
David Haney 9e7fbde9f1 Logical AND would never be true; broke into OR statement 2015-02-10 17:41:06 -05:00
Brennan 6224268953 Updating .kproj files 2015-02-04 14:20:22 -08:00
Chris Ross 096a0bf298 #174 - Constants for status codes, lookup for reason phrases. 2015-01-28 13:57:12 -08:00
Chris Ross 15a51e423f #175 - Decode multipart headers as UTF-8. 2015-01-22 09:42:09 -08:00
David Fowler dceba03f4a Removed unused dependencies
#173
2015-01-19 01:43:09 -08:00
Stephen Halter db484a7dcb Rename Microsoft.AspNet.HttpFeature to Microsoft.AspNet.Http.Interfaces 2015-01-16 19:46:04 -08:00
Ajay Bhargav Baaskaran 26860ad7de Code cleanup 2015-01-15 18:34:38 -08:00
Chris Ross d43cf30eff #162 - Rename PipelineCore project to Http.Core. Part 2. 2015-01-15 12:37:34 -08:00
Chris Ross 68be1d1b19 #162 - Change PipelineCore namespace to Http.Core. Part-1. 2015-01-15 11:52:34 -08:00
Chris Ross 4fb21644fc Implement strongly typed headers. 2015-01-14 15:41:09 -08:00
Ajay Bhargav Baaskaran 4377bb24ce Added extension methods for FormFile 2015-01-12 14:54:12 -08:00
Chris Ross 5872feb224 #139 - Mime multipart request parsing. 2015-01-07 15:42:46 -08:00
Pranav K ae169aa794 Reacting to System.Threading version changes 2014-12-15 14:42:21 -08:00
Victor Hurdugaci 7569703906 Add schema version to kproj files 2014-11-25 10:49:23 -08:00
Chris Ross b5156a00b3 Argument validation cleanup. 2014-11-14 15:14:16 -08:00
Chris Ross ba693dd383 Code cleanup. 2014-11-14 15:11:41 -08:00
Chris Ross 1dd3a2ee1f #147 - OWIN: Throw KeyNotFoundException if the underlying Feature is missing. Return defaults for required entries. 2014-11-14 15:11:40 -08:00