Skip to content

Releases: SuaveIO/suave

v0.33.0-libuv.1

31 Oct 16:10
@haf haf
Compare
Choose a tag to compare
v0.33.0-libuv.1 Pre-release
Pre-release

v0.33 libuv 1

This release contains bug-fixes for the libuv pre-release package.

For docs on libuv, please see the previous release notes: https://github.com/SuaveIO/suave/releases/tag/v0.33.0-libuv

v0.33.0-libuv

23 Oct 12:59
@haf haf
Compare
Choose a tag to compare
v0.33.0-libuv Pre-release
Pre-release

v0.33 libuv

This is a pre-release to let you play around with libuv and Suave in a cross-platform manner. We have currently no known bugs in the code; hopefully some will be found and fixed during this testing period. It should work on Linux, OS X and Windows.

We'd also like to get help with documentation; perhaps something we can cross-post in our docs and you on your blog/medium of choice – contact us through the issue tracker or on twitter: @suaveio.

First you need to pull down the nuget with this paket config and paket install in your solution:

source https://nuget.org/api/v2
nuget Suave
nuget Suave.LibUv

And now you can use it:

open Suave
open Suave.Web
open Suave.LibUv.Tcp

let cfg = { defaultConfig with tcpServerFactory = LibUvServerFactory() }
startWebServer cfg Api.app

Installing libuv

On OS X:

brew install libuv --universal
export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib

On Windows:

@powershell -NoProfile -ExecutionPolicy Bypass -Command "Start-FileDownload 'https://github.com/libuv/libuv/archive/v1.7.5.zip'"
7z x v1.7.5.zip & cd libuv-1.7.5 & vcbuild.bat x86 shared debug
mkdir src\\Suave.Tests\\bin\\Release\\ & cp libuv-1.7.5\\Debug\\libuv.dll src\\Suave.Tests\\bin\\Release\\libuv.dll

On Linux you can follow these instructions.

Creds to @ademar for writing the libuv layer!

LibUV Logo

/Henrik and Ademar

v0.32.1 – Cookie bugfix

13 Oct 17:44
@haf haf
Compare
Choose a tag to compare

Released with a bugfix for Cookies – they are now properly reset in the case of server crypto key change or client side corruption.

v0.32 – OWIN, basicAuth, headers

11 Oct 08:36
@haf haf
Compare
Choose a tag to compare

We're proud to present the v0.32 release with OWIN support. The OWIN support has been coming for a while now, almost a year in the making, but finally it's there.

pathStarts

We've added a combinator that checks if the absolute path of the request uri starts with some string: val Applicatives.pathStarts : (prefix:string) -> WebPart.

OWIN

This is the first OWIN release which has been tested with NancyFx and WebSharper, but not so much with middleware from the C# landscape, so there's most likely place for improvements. For those interested, here's where the sausage is made.

It's planned to add better support for IPrincipal / IClaimsPrincipal, but it's not been decided what the API should look like yet. Also, we plan to make the current memory buffering of the OWIN response optional; the reason we do it is because you may want to compose WebParts after the OWIN app.

We're maintaining composability of your apps by doing it, but it means you probably don't want to serve extremely large files through the OWIN layer unless you have a memory of (size * concurrent users) on your server. However, consider that ASP.Net buffered responses for a decade and most people were happily oblivious to it.

That said, we're considering adding a ofAppTerminating hoisting function that clearly states it may terminate the Suave applicative pipeline.

In this release, Suave is the OWIN server and host and not app, as the web parts currently are fairly specific to our HttpResult type. If you want to use the Suave applicatives this way, we'd be interested to know.

That Suave now is a valid OWIN host, means you should be able to run ASP.Net vNext on the server, if they have followed the OWIN specification. You now have another high-performance, web server to use on Linux and Windows to host corporation-lawyer sanctioned software on top.

The F# community is absolutely on-board with the change; read WebSharper's Suave announcement to see how you can easily make server-rendered HTML and JS without leaving F#.

Thanks to @haf @panesofglass for their work on this feature and to everyone who has tested and contributed to the discussion!

Basic Authentication

This is a Breaking change, as the signature now looks like this:

module Authentication =
  val authenticateBasic : f:(string * string -> bool) -> protectedPart:WebPart -> WebPart

It now matches the rest of Suave and lets you have access inside protectedPart, to the username of the user who successfully authenticated.

Thanks to @xkrt for his work on this feature!

Headers

We've changed the semantics of setHeader to overwrite existing headers with identical keys to what was set. This means it's probably working more like you expect (from the name, from the mental model of the http resonse).

addHeader is the one to use if you want to add and not overwrite a header.

module Headers =
    /// Ensures that the key header has the given value
    val setHeader : key:string -> value:string -> WebPart

    /// Adds the header key with the given value to the list of returned headers, even if that header already exists
    val addHeader : key:string -> value:string -> WebPart

Thanks to @xkrt for his work on this feature!

Upcoming improvements

@ademar has been auspicated the tea-leafs and saw that was libuv is good. Thus, as they say; once auspicated, almost done! #306

This means the suave is even less dependent on a the niche .Net feature of "async socket event args" and more in line with what's rapidly becoming the go-to (without the "considered harmful") asynchronous socket library for Linux (and Windows). After all, nodejs runs on AIX. I leave you all to consider the unicorn+rainbow implications of this.

We're also happy to thoughtfully consider that these changes have had absolutely no benefit to performance, nor drag on performance, come to think about it, so Suave is still a really fast and cross platform async web server!

// Henrik & Ademar

v0.31.2

04 Sep 07:44
@haf haf
Compare
Choose a tag to compare

This release downgrades FSharp.Core to 3.1.2.1. For the reasons behind this please review this issue.

  • [infra] downgrade to F# 3.1
  • logFormat writes size of the object returned to the client
  • A little bit more documentation about formData

Thanks to @wallymathieu @xkrt for your contributions to this release.

v0.32.0-owin

04 Sep 07:35
@haf haf
Compare
Choose a tag to compare
v0.32.0-owin Pre-release
Pre-release

This release is a 0.32 pre-release with owin support built in. The owin support is currently not complete, and progress can be tracked in #142

v0.31.1

18 Aug 16:46
Compare
Choose a tag to compare
  • Ignore invalid cookies in requests (#287)
  • Allows subsequent opening of files for reading or writing (5f4d18a)
  • Fix a bug in the EventSource module (#286)

v0.31.0

13 Aug 15:40
Compare
Choose a tag to compare
  • Include Vary: Accept-Encoding in responses by default (#277)
  • Don't send content for HEAD requests (#285)

v0.30.0

06 Jul 16:03
Compare
Choose a tag to compare
  • Globals.random replaced with ThreadSafeRandom (c2a6168).
  • Removed obsoletes.

v0.29.1

21 Jun 04:24
Compare
Choose a tag to compare

Fixes a Websocket bug handling large payloads.