vibe.d beta banner
get vibe.d

Asynchronous I/O that doesn’t get in your way, written in D

vibe.d 0.7.21 release

vibe.d 0.7.21 release

Header image
Tue, 18 Nov 2014Due to a number of highly busy months (more to come), this release got delayed far more than planned. However, development didn't stall and, finally, a huge list of over 150 changes found its way into the new version. Major changes are all over the place, including some notable changes in the SSL/TLS support and the web interface generator.

Features and improvements

  • SSL/TLS support
    • Added support for TLS server name indication (SNI) to the SSL support classes and the HTTP client and server implementation
    • Changed SSLPeerValidationMode into a set of bit flags (different modes can now be combined)
    • Made the SSL implementation pluggable (currently only OpenSSL is supported)
    • Moved all OpenSSL code into a separate module to avoid importing the OpenSSL headers in (by Martin Nowak) - pull #757
    • Added support for a VibeUseOldOpenSSL version to enable use with pre 1.0 versions of OpenSSL
    • Upgraded the included OpenSSL Windows binaries to 1.0.1j
  • Web interface generator
    • Added support for Json as a return type for web interface methods (by Stefan Koch) - pull #684
    • Added support for a @contentType attribute for web interface methods (by Stefan Koch) - pull #684
    • Added vibe.web.web.trWeb for runtime string translation support
    • Added support for nesting web interface classes using properties that return a class instance
    • Added support for @before/@after attributes for web interface methods
    • Added a PrivateAccessProxy mixin as a way to enable use of private and non-static methods for @before in web interfaces
    • Added support for validating parameter types to vibe.web.web (vibe.web.validation)
    • Added the possibility to customize the language selection in the translation context for web interface translations
    • Added optional support for matching request paths with mismatching trailing slash in web interfaces
    • SessionVar, if necessary, now starts a new session also for read accesses
  • HTTP sessions
    • Added a check to disallow storing types with aliasing in sessions
    • Session values are now always returned as const to avoid unintended mutation of the returned temporary
    • Added initial support for JSON and BSON based session stores
    • Added a Redis based HTTP session store (vibe.db.redis.sessionstore.RedisSessionStore)
    • Deprecated index operator based access of session values (recommended to use vibe.web.web.SessionVar instead)
  • Redis database driver
    • Added some missing Redis methods and rename RedisClient.flushAll to deleteAll
    • Added the vibe.db.redis.types module for type safe access of Redis keys
    • RedisReply is now a typed output range
    • Added a module for Redis with common high level idioms (vibe.db.redis.idioms)
    • Improved the Redis interface with better template constraints, support for interval specifications and support for Nullable!T to determine key existence
    • Made the member argument to the sorted set methods in RedisDatabase generic instead of string - issue #811
    • Added support for ubyte[] as a return type for various Redis methods (by sinkuu) - pull #761
  • MongoDB database driver
    • MongoConnection.defaultPort is now an ushort (by Martin Nowak) - pull #725
    • Added support for expiring indexes and dropping indexes/collections in the MongoDB client (by Márcio Martins) - pull #799
    • Added MongoClient.getDatabases (by Peter Eisenhower) - pull #822
    • Added an array based overload of MongoCollection.ensureIndex - issue #824
    • Added MongoCursor.skip as an alternative to setting the skip value using an argument to find (by Martin Nowak) - pull 888
  • HTTP client
    • Made the handling of redirect responses more specific in the HTTP client (reject unknown status codes)
    • Added support for using a proxy server in the HTTP client (by Etienne Cimon) - pull #731
    • Added HTTPClientSettings.defaultKeepAliveTimeout and handle the optional request count limit of keep-alive connections (by Etienne Cimon) - issue 744, pull #756
    • Added an assertion to the HTTP client when a relative path is used for the request URL instead of constructing an invalid request
    • Avoid using chunked encoding for HTTPClientRequest.writeJsonBody
  • HTTP server
    • Added support for IP based client certificate validation in the HTTP server (by Eric Cornelius) - pull #723
    • Avoid using chunked encoding for HTTPServerResponse.writeJsonBody - issue #619
    • Added HTTPServerResponse.waitForConnectionClose to support certain kinds of long-polling applications
  • Compiles on DMD 2.064 up to DMD 2.067.0-b1
  • All external dependencies are now version based (OpenSSL/libevent/libev)
  • Removed deprecated symbols of 0.7.20
  • Increased the default fiber stack size to 512 KiB (32-bit) and 16 MiB (64-bit) respectively - issue #861
  • Enabled the use of shared delegates for runWorkerTask and avoid creation of a heap delegate
  • Added support for more parameter types in runTask/runWorkerTask by avoiding Variant
  • Added an initial implementation of a Future!T (future/promise) in vibe.core.concurrency
  • Deprecated the output range interface of OutputStream, use instead
  • Prefer .toString() to cast(string) when converting values to string in Diet templates (changes how Json values are converted!) - issue #714
  • Added variants of the vibe.utils.validation functions that don't throw
  • Added UDPConnection.close()
  • Deprecated registerFormInterface and registerFormMethod
  • Added support for implicit parameter conversion of arguments passed to runTask/runWorkerTask (by Martin Nowak) - pull #719
  • Added for vibe.d compatible wrapping of stdin/stdout and std.stdio.File (by Eric Cornelius) - pull #729
  • Added for duplicating a stream to multiple output streams (by Eric Cornelius) - pull #732
  • Added support for an inotify based directory watcher in the libevent driver (by Martin Nowak) - pull #743
  • Added support for Nullable!T in - issue #752
  • Added a constructor for BsonObjectID that takes a specific time stamp (by Martin Nowak) - pull #759
  • Added output range based overloads of and readLine
  • Added
  • Added vibe.inet.webform.formEncode for encoding a dictionary/AA as a web form (by Etienne Cimon) - pull #748
  • BsonObjectID.fromString now throws an Exception instead of an AssertError for invalid inputs
  • Avoid using initialized static array for storing task parameters (by Михаил Страшун aka Dicebot) - pull #778
  • Deprecated the simple password hash functions due to their weak security - issue #794
  • Added support for serializing tuple fields
  • Added convertJsonToASCII to force escaping of all Unicode characters - see issue #809
  • Added a parameter to set the information log format for setLogFormat (by Márcio Martins) - pull #808
  • Serializer implementations now get the number of dictionary elements passed up front (by Johannes Pfau) - pull #823
  • Changed readRequiredOption to not throw when the --help switch was passed (by Jack Applegame) - pull #803
  • Added RestInterfaceSettings as the new way to configure REST interfaces
  • Implemented optional stripping of trailing underscores for REST parameters (allows the use of keywords as parameter names)
  • Made the message parameter of enforceHTTP lazy (by Mathias Lang aka Geod24) - pull #839
  • Improve the format of JSON parse errors to enable IDE go-to-line support
  • Removed all console and file system output from unit tests (partially by Etienne Cimon, [pull #852][issue852])
  • Improved performance of libevent timers by avoiding redundant rescheduling of the master timer

Bug fixes

  • Fixed BSON custom serialization of const classes
  • Fixed serialization of DictionaryList - issue #621
  • Fixed a bogus deprecation message for Diet script/style blocks without child nodes
  • Fixed an infinite loop in HTTPRouter when no routes were registered - issue #691
  • Fixed iterating over const(DictionaryList) (by Mathias Lang aka Geod24) - pull #693
  • Fixed an assertion in the HTTP file server that was triggered when drive letters were contained in the request path - pull #694
  • Fixed recognizing application/javascript in script tags to trigger the block syntax deprecation message
  • Fixed support for boolean parameters in web interfaces
  • Fixed falling back to languages without country suffix in the web interface generator
  • Fixed alignment of the backing memory for a TaskLocal!T
  • Fixed the port reported by UDPConnection.bindAddress when 0 was specified as the bind port (libevent)
  • Fixed busy looping the event loop when there is unprocessed UDP data - issue #715
  • Fixed exitEventLoop() to work when there is a busy tasks that calls yield() - issue #720
  • Avoid querying the clock when processing timers and no timers are pending (performance bug)
  • Fixed ManualEvent.wait() to work outside of a task (fixes various secondary facilities that use ManualEvent implicitly) - issue #663
  • Fixed encoding of StreamOutputRange.put(dchar) (by sinkuu) - pull #733
  • Fixed treating undefined JSON values as null when converting to a string - issue #735
  • Fixed using an id parameter together with @path in REST interfaces - issue #738
  • Fixed handling of multi-line responses in the SMTP client (by Etienne Cimon) - pull #746
  • Fixed compile error for certain uses of Nullable!T in web interfaces
  • Enable use of non-virtual access of the event driver using VibeUseNativeDriverType
  • Fixed building the "libev" configuration (by Lionello Lunesu) - pull #755
  • Fixed TaskLocal!T top properly call destructors after a task has ended (by Etienne Cimon) - issue #753, pull #754
  • Fixed the name of RedisDatabase.zcard (was Zcard)
  • Fixed a possible race condition causing a hang in MessageQueue.receive/receiveTimeout(by Ilya Lyubimov) - pull #760
  • Fixed RangeCounter to behave properly when inserting single char values
  • Fixed RedisDatabase.getSet (by Stephan Dilly) - pull #769
  • Fixed out-of-range array access in the Diet template compiler when the last attribute of a tag is value-less (by Martin Nowak) - pull #771
  • Fixed output of line breaks in the Markdown compiler
  • Fixed handling of the key argument of getRange, lrem and zincrby in RedisDatabase (by sinkuu) - pull #772
  • Fixed handling of Nullable!T and isISOExtStringSerializable parameters in REST interfaces
  • Fixed escaping of Diet tag attributes with string interpolations (by sinkuu) - pull #779
  • Fixed handling a timeout smaller or equal to zero (infinity) for RedisSubscriber.blisten (by Etienne Cimon aka etcimon) - issue #776, pull #781
  • Fixed handling of Unicode escape sequences in the JSON parser (by Etienne Cimon aka etcimon) - pull #782
  • Fixed HTTPServerRequest.fullURL for requests without a Host header - issue #786
  • Fixed RedisClient initialization for servers that require authentication (by Pedro Yamada aka yamadapc) - pull #785
  • Fixed the JSON parser to not accept numbers containing ':'
  • Removed an invalid assertion in HTTPServerResponse.writeJsonBody - issue #788
  • Fixed handling of explicit "identity" content encoding in the HTTP client (by sinkuu) - pull #789
  • Fixed HTTPServerRequest.fullURL for HTTPS requests with a non-default port (by Arjuna aka arjunadeltoso) - pull #790
  • Fixed detection of string literals in Diet template attributes - issue #792
  • Fixed output of Diet attributes using ' as the string delimiter
  • Fixed detection of numeric types in BsonSerializer (do not treat Nullable!T as numeric)
  • Fixed the REST interface client to accept 201 responses (by Yuriy Glukhov) - pull #806
  • Fixed some potential lock related issues in the worker task handler loop
  • Fixed memory corruption when TCPListenOptions.disableAutoClose is used and the TCPConnection outlives the accepting task - issue #807
  • Fixed a range violation when parsing JSON strings that end with [ or { - issue #805
  • Fixed compilation of MongoCollection.aggregate and support passing an array instead of multiple parameters - issue #783
  • Fixed compilation and formatting issues in the HTTP logger (by Márcio Martins) - pull #808
  • Fixed assertion condition in DebugAllocator.realloc
  • Fixed shutdown when daemon threads are involved - issue #758
  • Fixed some serialization errors for structs with variadic constructors or properties or with nested type declarations/aliases (by Rene Zwanenburg) - pull #817, issue #818, pull #819
  • The HTTP server now terminates a connection if the response was not completely written to avoid protocol errors
  • Fixed an assertion triggered by a server trying to write an error message when a response had already been made - issue #821
  • Fixed using TaskLocal!T with types that have certain kinds of "copy constructors" - issue #825
  • Fixed -version=VibeNoSSL (by Dragos Carp) - pull #834
  • Use "bad request" replies instead of "internal server error" for various cases where a HTTP request is invalid (by Marc Schütz) - pull #827
  • Removed a leading newline in compiled Diet templates
  • Fixed serialization of nested arrays as JSON (by Rene Zwanenburg) - issue #840, pull #841
  • Fixed OpenSSL error messages in certain cases (by Andrea Agosti) - pull #796
  • Fixed parsing of MongoDB URLs containing / in the password field (by Martin Nowak) - pull #843
  • Fixed an assertion in TCPConnection.waitForData when called outside of a task (libevent) - issue #829
  • Fixed an InvalidMemoryOperationError in HTTPClientResponse.~this()
  • Fixed a memory corruption issue for HTTPS servers (by Etienne Cimon) - issue #846, pull #849
  • Fixed low-precision floating point number output in JsonStringSerializer
  • Fixed compilation in release mode (not recommended for safety reasons!) - issue #847
  • Fixed low-precision floating point number output in the Redis client - [issue #857][issue857]
  • Fixed handling of NaN in the JSON module (output as undefined) (by David Monagle)- pull #860
  • Fixed the Redis subscriber implementation (by Etienne Cimon) - issue #855, pull #815
  • Fixed compilation of the Isolated!T framework - issue #801
  • Fixed an InvalidMemoryOperationError in DebugAllocator (by Etienne Cimon) - pull #848
  • Fixed detection of numeric types in JsonSerializer (do not treat Nullable!T as numeric) (by Jack Applegame) - issue #686, pull #869
  • Fixed error handling in Win32TCPConnection.connect and improved error messages
  • Fixed ping handling of WebSocket ping messages (by Vytautas Mickus aka Eximius) - pull #883
  • Fixed always wrapping the e-mail address in angular brackets in the SMTP client (by ohenley) - pull #887
  • Fixed custom serialization of const instances (by Jack Applegame) - pull #879
  • Fixed the RedisDatabase.set*X to properly test the success condition (by Stephan Dilly aka Extrawurst) - pull #890
  • Fixed sleep(0.seconds) to be a no-op instead of throwing an assertion error
  • Fixed a potential resource leak in HashMap by using freeArray instead of directly deallocating the block of memory (by Etienne Cimon) - pull #893

Posted at 17:44:25 +0100 by Sönke Ludwig

Comments for the post are currently disabled.


Misu10 years ago

I'm gonna use vibed soon, thanks for this work !

Do you really want to delete this comment?

Stephan Dilly10 years ago

Awesome, this release rocks! Thanks for all the hard work by all contributors! Danke schön :)

Do you really want to delete this comment?

Martin Nowak10 years ago

Great work, thanks a lot.

Do you really want to delete this comment?