forked from vapor/vapor
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pull] master from vapor:master #285
Open
pull
wants to merge
92
commits into
scope-demo:master
Choose a base branch
from
vapor:master
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* make Abort debuggable * named funcs * cleanup ci names * implement CBacktrace linux support
* update for xcode 12 * use (#file) instead
## Current behaviour `[ INFO ] GET /users/auth0%7C59abc/` ## Expected behaviour `[ INFO ] GET /users/auth0|59abc/` Co-authored-by: Jari (LotU) <j.koopman@jarict.nl>
* Add validation tests for optional nested objects * Improve nested validator to follow the required argument Co-authored-by: seeppp <jonas.schoch@naptics.ch> Co-authored-by: Joannis Orlandos <joannis@orlandos.nl> Co-authored-by: Jari (LotU) <j.koopman@jarict.nl>
* * Adds Application.Routes.caseInsensitive to allow case insensitive routes (defaults to false) * DefaultResponder will configure TrieRouter appropriately if set to true * Appropriate test * Docblock Co-authored-by: Tanner <tannernelson@gmail.com>
* add information about writing release notes * updates
* logging improvements * fix error test expectations * stacktrace capture
* immediate body streaming * fix echo handler expectations
* add vapor 3 api shims * fix trailing whitespace * deprecate expectation alias * deprecate expectation alias
* Supports closure for instantiating RedirectMiddleware * Path closure now gives the entire request * Clean up code * Updates documentation comment to reflect latest changes * Added RedirectMiddleware test * use `makePath` naming Co-authored-by: Tanner <me@tanner.xyz> Co-authored-by: Tanner <tannernelson@gmail.com>
* add github action * Update api-docs.yml * Update api-docs.yml * Update api-docs.yml * Update api-docs.yml * Update api-docs.yml * Update api-docs.yml Co-authored-by: Tanner <tannernelson@gmail.com>
* add provider tests to ci * fix provider tests * updates * fix
* Provide a way to customize bootstrapping of the logging system * Introduce a new `bootstrap()` method that takes a closure that creates a LogHandler factory, a factory-factory! * Make the current `bootstrap()` method call into the new one. The point of this maneuver is to allow for installing custom log handlers while retaining Vapor's procedure for setting the log level. * Rename the label of the factory argument Also add missing `self.`. * Move log level detection to public method on Logger.Level This move makes it possible to detect the desired log level the same way Vapor does when bootstrapping the LoggingSystem. Co-authored-by: Johan Carlberg <48096080+johan-carlberg@users.noreply.github.com>
* Add non-variadic variants of RoutesBuilder group methods. * Apply suggestions from code review
* Add require(_:error:) extension to Parameters. * Address PR feedback. * Throw error if type cast fails. * Address PR feedback. * Update docs.
* Dont run so many provider checks, just the latest Swift is fine. Should make the CI repo define what "latest" is.
* Add failing test for #2518 * Extract Date-Decoding into an extension * Use configuration for decoding of optional Dates (fixes #2518) * Extract Date-encoding into an extension * Use configuration for encoding of optional Dates * Update Formatting in URLEncodedFormDecoder.swift Co-authored-by: Siemen Sikkema <siemensikkema@users.noreply.github.com> * Update test name Co-authored-by: Tim Condon <0xTim@users.noreply.github.com> Co-authored-by: Andreas Tielmann <atielmann@deloitte.de> Co-authored-by: Siemen Sikkema <siemensikkema@users.noreply.github.com> Co-authored-by: Tim Condon <0xTim@users.noreply.github.com>
…ate middleware, enabled by default, so that users who don't want it can turn it off. Also fixes a copy-paste error in a fatal error message. (#2521)
As reported by #2480, right now `SessionData` is a public type without much use to developers to write middleware, algorithms, etc. on top of due to how strongly the storage is encapsulated. `SessionData` has been changed as follows: - Now conforms to `Equatable` and `ExpressibleByDictionaryLiteral` - A new `snapshot` computed property is available to get a copy of its storage - `init(_:)` is now deprecated in favor of `init(initialData:)` ```swift let data: SessionData = ["name": "Vapor"] // creates a copy of the data as of this point let snapshot = data.snapshot client.storeUsingDictionary(snapshot) ```
…there is no trailling new line (#2523) Co-authored-by: Tim Condon <0xTim@users.noreply.github.com>
* Allow custom media types for FileIO.streamFile 2nd squash * Use HTTP Range & HTTP Content Range headers for streaming partial content * Update Sources/Vapor/HTTP/Headers/HTTPHeaders+ContentRange.swift Co-authored-by: Siemen Sikkema <siemensikkema@users.noreply.github.com> * Update Sources/Vapor/Utilities/FileIO.swift Co-authored-by: Siemen Sikkema <siemensikkema@users.noreply.github.com> * Update Sources/Vapor/Utilities/FileIO.swift Co-authored-by: Siemen Sikkema <siemensikkema@users.noreply.github.com> * Update Sources/Vapor/HTTP/Headers/HTTPHeaders+ContentRange.swift Co-authored-by: Siemen Sikkema <siemensikkema@users.noreply.github.com> * Update Sources/Vapor/HTTP/Headers/HTTPHeaders+ContentRange.swift Co-authored-by: Siemen Sikkema <siemensikkema@users.noreply.github.com> * Update Sources/Vapor/HTTP/Headers/HTTPHeaders+ContentRange.swift Co-authored-by: Siemen Sikkema <siemensikkema@users.noreply.github.com> * Make the compiler happy * Add better bounds checking to range count * More bounds checking Co-authored-by: Tanner <tannernelson@gmail.com> Co-authored-by: Tim Condon <0xTim@users.noreply.github.com> Co-authored-by: Siemen Sikkema <siemensikkema@users.noreply.github.com> Co-authored-by: Tim <0xtimc@gmail.com>
* Add code to avoid crash + test * Add missing part * Apply suggestions from code review Co-authored-by: Tim Condon <0xTim@users.noreply.github.com> Co-authored-by: Tim Condon <0xTim@users.noreply.github.com>
* remove unnecessary files and link to multipart-kit * update to multipart-kit beta * update multipart-kit to latest tag
…inBased (#2559) Motivation: Mozilla's [CORS docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSMissingAllowOrigin) have > To allow any site to make CORS requests without using the * wildcard > (for example, to enable credentials), your server must read the value of > the request's Origin header and use that value to set > Access-Control-Allow-Origin, and must also set a Vary: Origin header to > indicate that some headers are being set dynamically depending on the > origin. but previously, we wouldn't set the Vary: Origin header. Modification: Set the "vary: origin" header when using the request's "origin" header. Result: More correct implementation of CORS.
Co-authored-by: Owain Hunt <owain.hunt@johnlewis.co.uk> Co-authored-by: Tim Condon <0xTim@users.noreply.github.com>
* Start backfilling some tests for metrics * Add failing test for not found route * Rewrite 404 path to avoid DOS attack * Failing test to distinguish between undefined routes and routes that return a 404 * Finalise path expressions * Don't crash the tests by bootstrapping multiple times * Tests passing * Make tests non-throwing * Check request.route instead of adding new bool * Update Tests/VaporTests/Utilities/CapturingMetricsSystem.swift Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org> * Add attribution for CapturingMetricsSystem * Update Tests/VaporTests/Utilities/CapturingMetricsSystem.swift Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org> * Remove last uses of NSUUID * Revert change to stop the tests crashing * Backfill more tests * Migrate CapturingMetricsSystem to NIOConcurrencyHelpers * Ensure undefined route methods get mapped to undefined * Add tests for the timers as well * Reuse dimensions for the timer as well * Rewrite undefined routes' method to undefined as well as the path * Avoid duplicating the method in the path * Add comment for rewriting path in metrics * Add test to ensure we don't pass through the ID for a dynamic path * Fix typo in comment Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>
…shared` accessor (#2576) The storage is a Dictionary and can potentially be mutated by one thread while being accessed from another which isn't holding the lock. This is not safe, even if the logic checks again after taking the lock. Unfortunately, this is likely to be a relatively obvious performance regression, but it's also a definitive thread safety concern.
* Update to logo with name * Use cropped logo
* Improve cookie parsing test * Strictly conform to RFC2616 * Add invalid cookie test cases * Remove unnecessary vars * Fix comment typo * Restore test case Co-authored-by: Tim Condon <0xTim@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )