Commit Graph
36 Commits
Author SHA1 Message Date
Johannes Weiss d2b671da66 make HTTPServerClientTests more robust 2018-01-05 15:19:22 +00:00
Norman Maurer 8f1ad37edd Use camel case for ChannelOption factory values and add docs 2017-12-20 14:18:07 +01:00
Johannes Weiss dfd25bf576 refactor Channel initialisation & *Bootstrap docs 2017-12-13 15:42:54 +00:00
Johannes Weiß d7d1d5dbf5 fixed a near miss (thanks Swift 4.1 compiler warning) 2017-12-18 15:57:31 +00:00
Johannes Weiß 94e1af5452 compile warning-free on Swift 4.1 2017-12-18 15:37:57 +00:00
Cory Benfield 0fa0224623 Configure this pipeline properly 2017-12-15 12:29:28 +00:00
Norman Maurer 76482816e6 Prefix all ByteBuffer methods with get if these allow access to unitialized memory. 2017-12-15 12:24:09 +01:00
Cory Benfield 3614d09a4b Provide a nicer setup helper for HTTP connections 2017-12-13 15:38:40 +00:00
Cory Benfield 4154a3bcbc Don't shut connections aggressively in tests 2017-12-15 10:41:46 +00:00
Cory Benfield f3e72c13f3 Add HTTP streaming compressor 2017-12-15 09:50:12 +00:00
Cory Benfield be3d8d00f8 Correctly decode HTTP HEAD responses 2017-12-13 17:10:44 +00:00
Johannes Weiß 06f9b1d63b merge ConcurrencyHelpers 2017-11-21 18:32:33 +00:00
Johannes Weiß 33fe401322 rename Future/Promise to EventLoopFuture/EventLoopPromise 2017-11-21 17:41:36 +00:00
Norman Maurer f369a17d42 Fix warnings that are cased by using try for functions that not throw. Leftover from 4a315c9e9d12345e70b838cdfea54ddb0b191da8 2017-11-16 19:39:16 +01:00
Johannes Weiß 31cd14eaad fix inEventLoop race and makes TSan happy 2017-11-10 14:56:33 -08:00
Norman Maurer 976f4752df Add HTTPRequestEncoder / HTTPResponseDecoder implementation and tests 2017-11-02 13:50:46 +01:00
Norman Maurer c22e5ead6b Remove ByteBufferAllocator constructor argument from HttpResponseEncoder
Motivation:

We can allocate the buffer on the fly if needed, no need to add the constructor argument.

Modifications:

Just allocate the buffer in the methods itself that need it.

Result:

Easier to construct encoder and cleaner code.
2017-11-02 12:56:00 +01:00
Cory Benfield cffd11d4e8 Fix tests that do not expect IOData 2017-11-01 16:24:59 +00:00
Cory Benfield 6d8848d239 Omit chunked encoding for HTTP/1.0 2017-11-01 16:17:23 +00:00
Norman Maurer 22a35b2bdb Add FileRegion support when using HTTP
Motivation:

Often people want to transfer large files over http which should be done using sendfile(...) for best performance.

Modifications:

- Add support for using FileRegion when sending body parts.
- Add tests

Result:

Be able to serve files without loading these into memory
2017-11-01 16:02:14 +01:00
Johannes Weiß 6173bee782 Split IOData into NIOAny & IOData (ByteBuffer | FileRegion) 2017-10-25 19:31:27 +01:00
Cory Benfield b2cbe766f0 Add support for HTTP Upgrade 2017-10-12 17:24:00 -07:00
Johannes Weiss 2889c7e3de fix buffer confusion on incomplete writes 2017-10-17 16:51:15 +01:00
Cory Benfield 0803012b7a Add support for retrieving headers in canonical form 2017-10-13 14:13:45 -07:00
Cory Benfield 6f17b320d5 Ensure no transfer-encoding when body is forbidden 2017-10-13 13:44:51 -07:00
Cory Benfield 1f52bac1f9 Add support for HTTP trailers 2017-10-04 13:49:03 +01:00
Johannes Weiss 0b265368a1 use the new Swift 4 String APIs for encoding/decoding Strings 2017-10-10 17:12:02 +01:00
Johannes Weiss 1adb581f59 remove more Foundation imports 2017-10-10 16:25:43 +01:00
Cory Benfield 47ac46bbe3 Don't join Set-Cookie headers together 2017-10-09 10:37:13 -07:00
Johannes Weiss b735ddf306 HTTPServerClientTest: depend on channelReadComplete working 2017-09-29 14:58:33 +01:00
Johannes Weiss a73d46f218 HTTP/1.1 Chunked Encoding
* HTTP/1.1 Chunked Encoding

* fix MarkedCircularBuffer: if not marked do not try to move mark when removing first

* fix HTTPRequestDecoder: dispatch callouts after parsing is complete

* fix HTTPTest: feed pipeline the inbound data correctly
2017-09-25 15:33:02 +01:00
Kevin Clark 78ba7a819e Make HTTPHeaders iterate with originalcase'd names
* Make HTTPHeaders iterate with originalcase'd names

Interface change as a consequence of this: now iterating headers
produces (name, value) tuples rather than (name, [values]).

* Add linux test wrapper

* Add case insensitive lookup test

* Update generate test headers

* Make HTTPHeadersIterator private
2017-07-24 12:55:12 -07:00
Kevin Clark ed98bffe28 Renames and cleanup
* Massage HTTPHeaders

Simple had it's own version that was the same aside from a couple of
minor tweaks.

* Default initializer for HTTPHeaders

* Rename HTTPRequest -> HTTPRequestPart

* HTTPResponse -> HTTPResponsePart

* Add HTTPVersion(major:,minor:)

* Allow access to HTTPVersion.major/minor

* Comments on HTTP response codes

* Fix tests (needed rename applied)
2017-07-18 10:38:23 -07:00
Johannes Weiß c09178ceb2 baby steps towards a type-safe Channel pipeline 2017-06-30 13:04:19 +01:00
Johannes Weiss 2fa81c9df4 make ByteBuffer allocation non-throwing (no reason it threw) 2017-06-29 15:38:02 +01:00
Johannes Weiß cc9ecf2071 HTTP tests & fixes 2017-06-29 12:20:52 +01:00