Commit Graph
2945 Commits
Author SHA1 Message Date
Max (Swift) Moiseev 8d4eb477ed Xenial and compose
* Docker work

- New image based on xenial.
- Simplified workflow with docker-compose
- Update the readme with docker-compose section
- Move docker related stuff to a dedicated folder

* Add a gen-cert.sh to the container image

* Document certificate generation and how to test all sample servers
2017-11-09 21:34:51 -08:00
Johannes Weiß 40edb34d8f introduce & test ByteBuffer.readString 2017-11-08 13:06:09 -08:00
Cory Benfield e72569e329 Add client-side SNI support 2017-10-25 15:04:46 +01:00
Cory Benfield 8efedf33fa Add ALPN handler 2017-11-01 16:14:11 +00:00
Norman Maurer b9e70f6e42 Rename HTTP files to make more sense and use uppercase 2017-11-09 20:57:36 -08:00
Johannes Weiß 79726e3b5f make HTTPDecoder typesafe (& refactoring) 2017-11-09 20:19:35 -08:00
Daniel Dunbar 6de5ea7c8b [NIOAny] Avoid need for force casts. 2017-11-09 19:33:17 -08:00
Norman Maurer 976f4752df Add HTTPRequestEncoder / HTTPResponseDecoder implementation and tests 2017-11-02 13:50:46 +01:00
Johannes Weiss c18db56fc2 make >= 0 checks for index/length a precondition 2017-11-09 02:49:11 -08:00
Max Moiseev dccbbf0bb7 Remove unnecessary Numeric constraint 2017-11-08 14:46:10 -08:00
Johannes Weiß 20800ed454 use the now fully featured FixedWidthInteger instead of EndiannessInteger 2017-11-08 13:08:02 -08:00
Cory Benfield cf64183e63 Improve sanity test 2017-11-08 17:26:12 +00:00
Cory Benfield 4d09289f9b Add missing test 2017-11-08 14:33:57 +00:00
Norman Maurer 9bb7f6727d Use correct types in default method
Motivation:

The default method we added for the MessageToByteEncoder has the incorrect parameter types and so is useless.

Modifications:

Fix type of parameter.

Result:

Default method match the protocol requirement.
2017-11-08 01:14:43 -08:00
Norman Maurer 6d7928beb2 Remove ; from the code 2017-11-06 21:53:30 +01:00
Cory Benfield 7a7536d076 Add support for X.509 subject commonName. 2017-11-03 13:49:32 +00:00
Johannes Weiss 839a5050dd ByteBuffer: fast path for contiguous collections 2017-11-03 02:39:54 -07: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 4e04a275c0 Add internal support for subjectAltName 2017-11-01 17:46:56 +00: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
Cory Benfield 8f2d17bc55 Break out common TLS events 2017-11-01 10:56:15 +00:00
Norman Maurer a172546d7b Use typesafe ChannelInboundHandler in IdleStateHandlerTest 2017-10-30 16:40:31 +01:00
Cory Benfield a6a6bfe788 Note TLS build issues 2017-10-30 11:23:09 +00:00
Cory Benfield 8b860d3009 Add SNI handler 2017-10-30 10:58:26 +00:00
Norman Maurer 9c7829a065 Port IdleStateHandler from Netty 2017-10-29 09:46:48 +01:00
Johannes Weiß 6173bee782 Split IOData into NIOAny & IOData (ByteBuffer | FileRegion) 2017-10-25 19:31:27 +01:00
Daniel Dunbar 87a47c88fc Prefer let bindings in port binding parsing. 2017-10-27 23:49:33 -07:00
Cory Benfield 32c30074ea Split client/server processing in OpenSSL 2017-10-24 16:41:23 +01:00
Johannes Weiss e9c76088ac ByteBuffer: avoid potential overflows for reading functions 2017-10-24 13:24:47 +01:00
Cory Benfield 25d57e8fab Add Channel.isActive 2017-10-19 16:44:42 -07:00
Cory Benfield b2cbe766f0 Add support for HTTP Upgrade 2017-10-12 17:24:00 -07:00
Johannes Weiss cf352ac0c3 depend on OpenSSL properly 2017-10-19 19:51:42 +01:00
Cory Benfield fb9e14b4d4 Don't lose promises on synchronous close. 2017-10-18 16:53:45 -07:00
Johannes Weiss ad3d8ad34a improve the readme 2017-10-18 19:29:25 +01:00
Cory Benfield 7dddd67608 Add TLS configuration object 2017-09-29 14:25:46 +01:00
Johannes Weiss 7954a1bf18 print diff if Linux tests are missing 2017-10-17 18:57:14 +01:00
Tom Doron f76a2bfa66 sort linux tests
motivation: generated linux tests dont have consitent sorting in different OSs

changes:

* change test generator to sort tests and imports in memory before writing to file
* update LinuxMain to the sorted version
2017-10-17 09:51:59 -07:00
Johannes Weiss 2889c7e3de fix buffer confusion on incomplete writes 2017-10-17 16:51:15 +01:00
Tom Doron a4d9f3f355 add prb sanity check
motivation: make sure we have linux test coverage

changes: add pr check to test for "sanity" which now only includes linux tests, but can be extended to do other things
2017-10-16 13:15:31 -07:00
Cory Benfield 0803012b7a Add support for retrieving headers in canonical form 2017-10-13 14:13:45 -07:00
Cory Benfield 2a7066873a Add missing Linux tests 2017-10-13 15:02:22 -07:00
Cory Benfield 6f17b320d5 Ensure no transfer-encoding when body is forbidden 2017-10-13 13:44:51 -07:00
Johannes Weiss 8c0ac74ce4 easy swift wrapper to be able to use
- `./swiftw build`
 - `./swiftw test`
2017-10-12 17:56:14 +01:00
Johannes Weiss fef24e8a8a readme: we do not have the .swift-version file anymore 2017-10-12 16:35:41 +01:00
Johannes Weiss 3bef8a4012 turn import Foundation comments into code :) 2017-10-12 16:33:50 +01:00
Cory Benfield 1f52bac1f9 Add support for HTTP trailers 2017-10-04 13:49:03 +01:00
Cory Benfield 44c753b8de Add OpenSSL dependency 2017-10-10 09:45:15 -07:00
Cory Benfield 8094e43582 Prevent multiple closure of the EmbeddedChannel. 2017-10-10 09:21:46 -07:00