motivation: more secured ci setup
changes:
* enable :z selinux flag on bind mounts so we can enable selinux on ci
* drop potentially exploitable capabilities from docker-compose
* create a 16.04 docker-compose setup so we can run tsan in ci (broken on 18.04)
As discussed in #128. We make the ResponseAccumulator public to give developers an easy time to create a Task. With the ResponseAccumulator the developer using this does not have to worry, about implementing the HTTPClientResponseDelegate all by himself.
* Bugfix HTTPS SNI and IP Address
Motivation:
Solving the SNI Bug
Modifications:
Added an internal extension on String for checking if the hostname is an IP Address -- see the private extension on SNI. Additionally using the IPv4Address and IPv6Address Function from Network above 10.14 as protecting with #availabe.
Adding the test for HTTPS and IP in as hostname
Result:
We get results with an IP as Hostname
Motivation:
We need a test that we can handle servers that repeatedly send
connection: closes.
Modification:
Add a unit test that always makes the server send connection: close.
Result:
More test coverage.
Motivation:
It's important to also have a test case where async-http-client is
actually used to do multiple parallel requests on multiple workers.
Modification:
Add a test where 5 workers are doing 100 requests each.
Result:
Better test coverage.
Motivation:
More unit tests are good and now that SwiftNIO shipd
`NIOHTTP1TestServer`, writing integration tests for async-http-client is also
more straightforward.
Modification:
Demonstrate some tests using NIOHTTP1TestServer.
Result:
More tests.
motivation: the Swift Server Workgroup is not a legal entity and cannot hold copyrights. with this change, code authors continue and retain their copyrights under the apache license and previous copyrights note, but Apple steps up instead of the workgroup which has no legal status
changes:
* update header files to say "Apple Inc. and the AsyncHTTPClient project authors" instead of "Swift Server Workgroup and the AsyncHTTPClient project authors"
* update validation scripts to check for the correct header
* add CONTRIBUTING.md file to explain how to make contributions and include a legal notice about licensing the contribution to Apple and the project
* regenerate CONTRIBUTORS.md to reflect most recent contributions
motivation: better ci testing
changes:
* add api breakage script to test api breakage in ci
* add "shell" utility docker-compose task to run api breakage script
* change test task to treat warning as errors
* prepare to test with thread sanitizer in 5.1
This commit fixes#95 by always hopping event loop futures received from
the delegate to the right event loop. This could be a source of bugs if
the library users forgot to hop(to:) futures from their delegates
implementations.
Motivation:
Right now, HTTPClient only asserts that it's shut down if it was started with its own EventLoopGroup.
That however is weird because it's lifecycle model depends on the parameters you pass to `init`.
Modifications:
Always validate the lifecycle (in debug mode).
Result:
API makes more sense.
* refactor proxy configuration
motivation: make proxy configuration follow same convention as other configuration
changes:
* nest Proxy under HTTPClient.Configuration instad of top level HTTPClient
* make host and port public and mutable, following convention of other configuration objects in this library
* add some API docs
* fixup
* add NIO event loop as an argument for execute
* review fix: add to np-delegate method as well
* Resolve confict
* add missing linux test
* fix formatting
* missing self
* review fix: add event loop preference argument instead of eventloop
* formatting
* review fix: spelling
* fix compilation error
* review fixes: make preference argument not explicit and add precondition that EL must be part of ELG
* fix README: fixed a couple of documentation mistakes
- README suggested that you should shut down the client in a `defer` block right after calling `get` which will not actually work because the `get` is asynchronous so returns before it's done
- README said that if you share the `EventLoop` you don't need to shut down the `HTTPClient` which is not true
- README didn't make it clear that using `HTTPClient(eventLoopGroupProvider: .createNew)` is an acceptable thing to write in many places but it's really resource inefficient
* Update README.md
* Ignore uncleanShutdown error when state is head or body
* Add ignoreNIOSSLUncleanShutdownError to Configuration
* Revert old HTTPClient.init founctions
* Run generate_linux_tests.rb
* Rename ignoreNIOSSLUncleanShutdownError to ignoreUncleanSSLShutdown
* Make tests compatible with swift 5.0
The only place where this method is currently called uses its return
value, but that's specific to the context where it's used (inside of
chained calls to map/flatMap). Future uses might not always need to use
the return value since it is the same as what's passed as the method
argument.
motivation: safer handling of request validation and mutation
changes:
* drop request version
* made request method and url immutable
* made request scheme and host internal
* fix scheme logic to be non-case sensitive
* adjusted redirect handler implementation to stricter request immutabllity
* adjust and add tests
motivaiton: unified format
changes:
* fix outstanding formatting issues
* add a call to swiftformat as part of sanity script
* fix sanity script language check debugging statements