Commit Graph
19 Commits
Author SHA1 Message Date
Johannes Weiss 7d5109a673 no auto headers for GET 2018-01-19 15:46:52 +00:00
Cory Benfield d61e084d3c Doc comments for NIOHTTP1 2017-11-30 16:07:41 +00:00
Johannes Weiß 202e1c37d7 port integration tests for HTTP server 2017-10-10 19:41:01 +01:00
Max (Swift) Moiseev 198d6b447b Explicit access modifiers on members in extensions 2017-11-18 04:40:26 -08:00
Johannes Weiß 79726e3b5f make HTTPDecoder typesafe (& refactoring) 2017-11-09 20:19:35 -08:00
Norman Maurer 976f4752df Add HTTPRequestEncoder / HTTPResponseDecoder implementation and tests 2017-11-02 13:50:46 +01: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 b2cbe766f0 Add support for HTTP Upgrade 2017-10-12 17:24:00 -07: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 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 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ß 06ff146839 fix missing autoreleasepool & faster string -> bytes 2017-07-17 17:57:15 +01:00
Johannes Weiß c09178ceb2 baby steps towards a type-safe Channel pipeline 2017-06-30 13:04:19 +01:00
Johannes Weiß cc9ecf2071 HTTP tests & fixes 2017-06-29 12:20:52 +01:00