Commit Graph

464 Commits

Author SHA1 Message Date
cheatfate 1d49ae7a47 Fix x86 int conversion. 2021-02-18 22:16:04 +02:00
cheatfate eb81018d02 Address review comments and fix issues found.
Adding more tests.
2021-02-18 22:16:04 +02:00
cheatfate fc0d1bcb43 Address review comments. 2021-02-18 22:16:04 +02:00
cheatfate 6f8d06f12d Add HttpDisconnectError to avoid client processor notification call. 2021-02-18 22:16:04 +02:00
cheatfate 1789328748 Set TLSStream default to use TLS1.2 only. 2021-02-18 22:16:04 +02:00
cheatfate 3d74c5cdd2 Add tests for getContentEncoding() and getTransferEncoding(). 2021-02-18 22:16:04 +02:00
cheatfate b47fcb3e86 Annotate with `raises:[Defect]`. 2021-02-18 22:16:04 +02:00
cheatfate 45cb009be2 Remove `bodyTimeout` because downloading body is not under our control. 2021-02-18 22:16:04 +02:00
cheatfate 4406ab7072 Add positive decimal integer parsing tests. 2021-02-18 22:16:04 +02:00
cheatfate 3495122867 Fix getMultipartBoundary() issues and add tests for it. 2021-02-18 22:16:04 +02:00
cheatfate 9b48496513 Fix compilation error with nimcrypto/utils import. 2021-02-18 22:16:04 +02:00
cheatfate 3569e4d553 testutils must be last executed test. 2021-02-18 22:16:04 +02:00
cheatfate 3e9ffae407 Properly fix case when request body size exceeds maximum allowed size. 2021-02-18 22:16:04 +02:00
cheatfate 970e5641d7 Add less strict rules for BoundStream reader/writer. 2021-02-18 22:16:04 +02:00
cheatfate d43a9cb92d HttpServer now supports TLS.
Some TLSStream fixes to properly support EOF.
Some HttpServer to properly support TLS handshake problems.
HttpServer test suite for HTTPS.
2021-02-18 22:16:04 +02:00
cheatfate 1a3e9162a4 Fix multipart end of message handling.
Add apps.nim.
Change copyrights dates.
Add httpserver tests to test suite.
2021-02-18 22:16:04 +02:00
cheatfate 789a5f8252 Fix dependency name. 2021-02-18 22:16:04 +02:00
cheatfate fb11d9f8ab Add httptable changes. 2021-02-18 22:16:04 +02:00
cheatfate 8c20b369b7 Fix queryParams() to not produce empty values.
Fix part() cancellation.
Add requestInfo() procedure.
Fix request.scheme.
Add MultiPart.isEmpty()
Fix MultiPart counter.
Add isEmpty() for HttpTable.
Add some documentation in HttpTable.
2021-02-18 22:16:04 +02:00
cheatfate a310a5620a General fixes. 2021-02-18 22:16:04 +02:00
cheatfate 0b03f8ec50 Expect header handling and response preparations. 2021-02-18 22:16:04 +02:00
cheatfate 74b0f85fc7 Add async post() procedure. 2021-02-18 22:16:04 +02:00
cheatfate 53aec163eb Fix nimble dependencies. 2021-02-18 22:16:04 +02:00
cheatfate 475c03ff7b Fix MultiPart handling mechanisms. 2021-02-18 22:16:04 +02:00
cheatfate c0472bd349 Fix streams to check only for Closed state. 2021-02-18 22:16:04 +02:00
cheatfate 534df03a0b Fixes and improvements 2021-02-18 22:16:04 +02:00
cheatfate 0e5ea5b737 Prepare for HttpResponse. 2021-02-18 22:16:04 +02:00
cheatfate 60e5396a9e Remove executable. 2021-02-18 22:16:04 +02:00
cheatfate 8381a40868 Initial commit. 2021-02-18 22:16:04 +02:00
cheatfate 0b396c34d8 Add newline. 2021-02-18 22:16:04 +02:00
cheatfate 2defc4b822 Add sequence of bytes as boundary to BoundStream and tests. 2021-02-18 22:16:04 +02:00
cheatfate fb137112be Remove debugging changes. 2021-02-18 22:16:04 +02:00
cheatfate 13eddf382d Simplification and fixes for TLSStream state machine. 2021-02-18 22:16:04 +02:00
cheatfate e8d2a3ca0a Attempt #5. 2021-02-18 22:16:04 +02:00
cheatfate 49fd70f504 Attempt #4. 2021-02-18 22:16:04 +02:00
cheatfate f1b43aeb04 Investigation of Linux freezes #3. 2021-02-18 22:16:04 +02:00
cheatfate cf42a5455e Investigation of Linux freezes #2. 2021-02-18 22:16:04 +02:00
cheatfate bb176ba574 Investigation of Linux freezes #1. 2021-02-18 22:16:04 +02:00
cheatfate ac8b11d6ca close() procedure should not raise, otherwise its impossible to cleanup. 2021-02-18 22:16:04 +02:00
cheatfate 0cb6840f03 Big refactoring of AsyncStreams.
1. Implement all read() primitives using readLoop() like it was done in streams.
2. Fix readLine() bug.
3. Add readMessage() primitive.
4. Fixing exception hierarchy, handling code and simplification of (break/continue + exception).
5. Fix TLSStream closure procedure.
6. Add BoundedStream stream and tests.
7. Remove `result` usage from the code.
2021-02-18 22:16:04 +02:00
Ștefan Talpalaru 39456e9c18
README: remove claim about temp var reordering (#155)
...between `await` calls. Can no longer replicate.
2021-02-10 16:49:12 +02:00
Eugene Kabanov dcf197a8c7
Attempt to fix MacOS compilation issues. (#152) 2021-02-02 17:10:07 +02:00
Jacek Sieka e7f5f855ab
use constant for ip kind (#151)
IPV6_MULTICAST_HOPS already declared in posix.nim while IP_MULTICAST_TTL
has a value that will stay constant on linux/x86_64 - better codegen and
nlvm compat like this.
2021-02-02 16:12:12 +02:00
andri lim c1f6e7276e
add github action script (#144) 2021-01-20 17:36:10 +02:00
Eugene Kabanov 491213dfa0
Add callIdle() primitive. (#148)
* Add callIdle primitive.

* Make single idle callback to be processed by single poll() step.
Add idleAsync() primitive to allow wait for "idle" time.
Refactor some `result` usage.
2021-01-19 13:48:39 +01:00
Jacek Sieka 9a420c6b05
work around overload resolution issues (#146)
it seems that due to a naming conflict from asyncdispatch, callSoon is
deduced to raise exceptions even if it doesn't in modules that import
both, even indirectly - this patch randomly works around the issue with
some more overloads
2021-01-11 22:15:21 +01:00
Eugene Kabanov 0933feaa35
Fix callSoon to raise Defect only. (#145)
* Initial commit.

* Move pragmas to forward declaration.
Add raises to callSoon declaration.

* Fix for IOSelectorsException.
2021-01-11 18:15:23 +01:00
cheatfate 46c0bf3c5a
Fix define to skip flaky test on MacOS. 2020-11-27 03:50:38 +02:00
Eugene Kabanov bca5559c6a
Race() call (#142)
* Add `race` procedure call which extends `one` with FutureBase.

* Fix race() and add test procedures.
2020-11-27 00:50:55 +02:00
Eugene Kabanov ac9b3e304f
Fix deadlock for pending write() calls on transport close. (#139)
Add tests for read() and write() deadlocks.
2020-11-18 11:30:33 +02:00