13 Commits
Author SHA1 Message Date
Fabian Fett af5966f1d1 Reduce use of HTTPClient.Configuration in the Connection objects (#635) 2022-10-07 08:05:28 -07:00
Fabian Fett 897d49aa1b Replace Lock with NIOLock (#628)
SwiftNIO 2.42.0 has deprecated Lock and replaced it with a new NIOLock. This commit removes all uses of Lock and replaces them with NIOLock. Further, now, we must require SwiftNIO 2.42.0
2022-09-27 15:42:47 +02:00
Fabian Fett 29d194f4c4 Fix flaky test: testConnectionClosesAfterTheRequestWithoutHavingSentAnCloseHeader (#520) 2021-12-06 18:31:32 +01:00
Fabian Fett 170fd536f9 Support informational response heads (#469) 2021-11-10 13:33:38 +01:00
Fabian Fett d49602f96f Fix failing test based on HTTPDecoder that supports informational responses (#470) 2021-11-09 15:42:49 +01:00
Fabian Fett d0d4598f56 Replace tests that depend on task handler (#444) 2021-09-29 12:14:17 +02:00
Fabian Fett 16ad7588b1 [HTTP1Connection] Handle 101 Switching Protocols (#442) 2021-09-28 09:52:26 +02:00
Fabian Fett 7ff7ab43ae [HTTP1Connection] Add download streaming backpressure test (#435)
### Motivation

In #427 we switched the implementation over to our new `HTTPConnectionPool`. When we did this, we removed the possibility to access the requests underlying channel. For this reason we needed to remove a number of tests from `HTTPClientInternalTests`. As @weissi pointed out, we should at least still integration test downstream backpressure.

This pr replicates the behavior from `HTTPClientInternalTests.testUploadStreamingBackpressure` directly on the `HTTP1Connection`.

### Changes

- Move and adjust test from `HTTPClientInternalTests.testUploadStreamingBackpressure`
- Rename the test to `testDownloadStreamingBackpressure` since we only test incoming bytes backpressure.

### Result

An integration backpressure test, that survived #427.
2021-09-24 15:58:19 +02:00
Fabian Fett 64fbfdaeda [HTTP1Connection] Option to ignore unclean ssl shutdown errors (#432)
- a new `RequestOptions` struct was created, that can be used to set request specific options. It is required by the `HTTPExecutableRequest`
- Added support for `ignoreUncleanSSLShutdown` in the `HTTPRequestStateMachine` and the `HTTP1ConnectionStateMachine`. In http/2 `ignoreUncleanSSLShutdown` is always off.
2021-09-21 10:04:17 +02:00
Fabian Fett ed58449c04 Add tests to observe HTTP/1.1 connection closures (#423)
- Moved MockConnectionDelegate to HTTP1ConnectionTests.swift, where it is actually used.
- Added tests around sudden connection closures
2021-09-13 16:05:45 +02:00
Fabian Fett eab2a84b1c Use explicit NIO imports (#407)
* Use explicit NIO imports for `NIOCore`, `NIOPosix` and `NIOEmbedded`
* Updated dependencies
2021-08-19 21:11:49 +02:00
Fabian Fett 44efb9481b Cleanup: Connection cancel -> shutdown (#404)
* Cleanup

* Code review
2021-07-23 11:52:46 +01:00
Fabian Fett e967f9a099 Add HTTP1Connection (#400) 2021-07-13 13:32:18 +02:00