Releases: olliNiinivaara/GuildenStern
Releases · olliNiinivaara/GuildenStern
7.2.1
7.2.0
- Compatibility with ARM architecture
- Bug fix: getUri etc. in the new compact http server mode
- Bug fix: failed read in the new compact http server mode
7.1.0
- All threads are initialized when their server is started (instead of when they are first used), making the system more fail-fast
- - is an accepted char in header field names
- WebSocketServer code clean-up: WebSocketContext removed; opcode not anymore visible to end users
- Minor fixes and improvements
7.0.0
Release notes, 7.0.0 (2024-06-01)
StreamingServer has been merged to HttpServer
- receiveInChunks iterator renamed to receiveStream
- maxrequestlength renamed to bufferlength
- newHttpServer does not anymore take hascontent parameter, but instead:
- newHttpServer takes contenttype parameter:
- Compact (the default mode): Equivalent to previous hasContent=true mode, where whole request body must fit into the buffer
- NoBody: Equivalent to previous hasContent=false mode, for optimized handling of requests like GET that do not have a body
- Streaming: Equivalent to previous StreamingServer, where you have to read the body yourself using the receiveStream iterator
- startDownload-continueDownload-finishDownload combo renamed to replyStartChunked-replyContinueChunked-replyFinishChunked
Header processing streamlined
- parseHeaders and parseAllHeaders obsoleted
- newHttpServer takes headerfields parameter, listing header fields that you need
- in request handlers http.headers StringTableRef is automatically populated with needed header key-value pairs
New MultipartServer
- handles multipart/form-data for you as neatly parsed
- operates in streaming manner, allowing huge uploads without blowing up RAM
Improvements to websockets
- If you do not accept a connection (reply false in upgradeCallback), a HTTP 400 reply is now automatically sent before the socket is closed
- PONG is now automatically replied to PINGs, sendPong proc is removed
- default reply values changed, now timeoutsecs = 10, sleepmillisecs = 10
- if all in-flight receivers are blocking, now suspends for (sleepmillisecs * in-flight receiver count) milliseconds
- fixed isMessage bug
6.1.0
- fixed nimble path
- fixed README example
- new receiveInChucks iterator in streamingserver for receiving big data, for example POST data that does not fit in main memory
- new startDownload-continueDownload-finishDownload combo in streamingserver for sending big and/or dynamic responses as Transfer-Encoding: chunked
- new and upgraded streamingserver examples as required
6.0.0
- major rewrite, breaking changes here and there, consult migration guide and code examples.
- dispatcher(s) can now be replaced just by changing import(s)
- every TCP port is now served by different server, allowing port-by-port configuration of resource usage
- non-blocking I/O with cooperative multithreading now used everywhere
- new suspend procedure for allowing other threads to run also when waiting for I/O in user code
- overall compatibility with Nim version 2.0
- single-threaded mode is no more
- TimerCtx is no more
5.1.0
- new multiSend proc for WebSockets: can be called from multiple threads in parallel
- better default logging
- other fixes
5.0.0
- Breaking change: If you use timer handlers, you must now import guildenstern/timerctx
- Refactored timer handlers to use same logic as other handlers
- New proc removeTimerCtx for stopping timers
- new logging implementation supporting multiple log levels, -d:fulldebug obsoleted
- performance optimization: threadpool now incorporates a (lock-free) task queue
4.0.0
- serve proc now accepts the amount of worker threads to use
- registerThreadInitializer is now a global proc (not tied to a GuildenServer)
- ctxWs web socket upgrade now accepts a callback closure (instead of initial message to send)
- can listen to multiple ports even with same handler (just register different handler callback proc for each port)
- new ctxBody handler for efficiently handling POST requests.
- new isRequest proc for efficiently inspecting request content
- new custom threadpool
- code fixes and cleanups
4.0.0-rc1
- registerThreadInitializer is now a global proc (not tied to a GuildenServer)
- new setWorkerThreadCount proc for (optionally) setting the amount of worker threads
- new isRequest proc for efficiently inspecting request content
- removed dependency on stdlib threadpool
- code fixes and cleanups