implicit.ly

Scala software, hot off the presses

unfiltered 0.6.2

New Features

Multipart POST support for Netty

This substantial contribution by g-eorge handles file of uploads of arbitrary size, as previously supported only for filter plans. See the netty-uploads readme for details.

Migration Note: If you were using the unfiltered-uploads module before, you should now depend on unfiltered-filter-uploads. The former now serves as a base implementation for the filter and netty upload modules.

Kits

  • unfiltered.kit.Secure redirects HTTP requests to HTTPS.
  • unfiltered.kit.Auth requires basic auth for matching requests.
  • unfiltered.kit.AsyncCycle — removed this promise/future-aware kit for the time being

Extractors

Response Functions

Fixes

  • Issue 110 Keymanagers loaded redundantly for Netty bindings
  • Issue 111 TLS contexts created redudantly for Netty bindings
  • Issue 119 NoSuchElementException for parameterValues
  • Issue 123 Find path suffix only from path part of uri
  • Issue 126 Tiny fix in url generation for Jetty Https Server

Unfiltered is a toolkit for servicing HTTP requests in Scala.

via herald

Filed under  //   unfiltered  

unfiltered 0.6.1

Updates unfiltered-spec to depend on dispatch 0.8.8, fixing a dependency resolution problem for Maven users.

Adds the AsyncCycle kit to structure asyncronous request cycles around the common foreach interface to futures and promises.

Unfiltered is a toolkit for servicing HTTP requests in Scala.

via herald

Filed under  //   unfiltered  

Unfiltered 0.6.0

Cookies changes

We've added support for the HttpOnly and Version, properties of cookies. This change affects the source of extraction of Cookies. Rather than delegating to HttpRequest, Cookies are now extracted directly from the headers of an HTTP request on demand. Since this change added two new properties to the Cookie case class, this affects any cookie extraction you may be doing.

We have removed the deprecated methods on Cookie: domain, path, maxAge, and secure in favor of using built-in support for named arguements provided by Scala case classes.

ResponseCookies has been deprecated in favor of SetCookies which is more in line with the Set-Cookie header it wraps.

The SetCookies response function also provides a convenience method to discard client cookies

SetCookies.discarding(name0, ..., nameN)

The method cookies on unfiltered.request.HttpRequest has been deprecated along with the cookies method implementations defined on unfiltered.filter.RequestBinding and unfiltered.netty.RequestBinding

Routes

Unfiltered now includes additional options for requests routing in unfiltered.kit.Routes. Applications that dispatch requests based on many different paths can use the provided kits to centralize and isolate their path routing.

Three different kinds of routing are provided, with examples in the test specifications. Routes.specify (specs) uses Rails-style route definitions, Routes.regex (specs) uses regular expressions, and Routes.startsWith (specs) performs a simple match against the beginning of the path.

unfiltered-library

Html5 ResponseFunction to prefix output with <!DOCTYPE html>, contributed by bblfish.

Dependencies Updates

  • Netty 3.3.1
  • Jetty 7.6.0.v20120127
  • lift-json 2.4 final

Unfiltered is a toolkit for servicing HTTP requests in Scala.

Unfiltered 0.5.3

  • Fix for regression introduced in 0.5.2 in the resources handler of unfiltered-netty-server. Unique instances of the ChunkedWriteHandler were not created for each request, causing bad responses.
  • Fix for issue #100 (woot?), Sec-WebSocket-Location (WSLocation) is hard-coded to ws:// protocol { romusz }

Unfiltered is a toolkit for servicing HTTP requests in Scala.

Unfiltered 0.5.2

Intent chaining

Applications that internally chain intent functions are now recommended to use Pass.onPass rather than the orElse method defined on PartialFunction.

Pass.onPass is aware of the explicit Pass object that may be returned by intents and it is also more efficient than orElse for many chained intent functions. There are two ways to use onPass:

import unfiltered.request._
val combined1 = Pass.onPass(intent1, intent2)
val combined2 = intent1.onPass(intent2)

These two produce the same combined intent function; the second uses an implicit conversion imported from the package object.

unfiltered-netty-server

In recent releases plan and handler took a by-name parameter to support the case where new instances of Netty handlers are required for each request. This lead to unexpected behavior for some more common use cases, where the caller passed in a new handler thinking it would be shared for all requests.

To avoid confusion, we've restored the previous parameter types to plan and handler methods. If you need to pass in a plan "factory", such as for a chunk aggregator, there is a new method makePlan that takes a by-name parameter. The new chunked(maxContentLength: Int) convenience method also provides this behavior directly.

unfiltered-netty-websockets

Fixed issue #99, error when decoding large web socket messages.

unfiltered-scalatest

Corrected scala-test dependencies for different versions of Scala. { dwestheide }

unfiltered-jetty

Updated dependency to 7.5.4.v20111024 { max-l }

Fixed issue #89, use of deprecated Jetty keystore methods.

ls.implicit.ly

Added ls plugin to the build and metadata to the repository, so that Unfiltered releases are recorded at ls/unfiltered. Also, FYI! The ls server is built with Unfiltered.

Unfiltered is a toolkit for servicing HTTP requests in Scala.

Unfiltered 0.5.1

Asynchronous Servlet Responses

Asynchronous responses are now supported for Servlet 3.0 filters, via the unfiltered-filter-async module using Jetty continuations. See the updated bindings documentation for an example. { pk11 }

Websockets

The unfiltered-netty-websockets module is updated to support IETF draft 10 of the specification, supported by Firefox 7 and Chrome 14. { softprops }

Cookies

Cookies are supported with request matchers and response functions, as described in a new documentation section. { softprops }

Github Organization

Our source repository now belongs to the Unfiltered github organization. Bookmarks and git remotes must be updated to unfiltered/unfiltered.

Netty Executors

Netty cycle plans now have their own default thread pools instead of sharing a global pool, to simplify a graceful shutdown. Applications are recommended, as before, to define their own memory-bound thread pools tailored to their production environment. { n8han }

Eclipse-compatible Source Jars

The published source jars now fully nested package-directories as required by Eclipse for navigation to library sources. { tekul }

Unfiltered is a toolkit for servicing HTTP requests in Scala.

Unfiltered 0.5.0

Library

New unfiltered-agents module for targeting and identifying common user agents provided by chrislewis

Upload

unfiltered-uploads StreamedFileWrapper#stream method now returns a generic type T #47

Scalate

Display of template compilation errors in development mode and fix for additional attribute overrides was contributed by teamon.

Netty

Unfiltered's Netty support undergoes a number of changes with this release. Most noticeably, applications are now required to define exception handling behavior for both async.Plan and cycle.Plan, and request execution behavior for the cycle.Plan. Details are available in the expanded Unfiltered documentation.

netty-server now depends on the netty module. This will provide more design consistency when implementing server behavior. If you were depending on unfiltered-netty before, you likely need to depend on unfiltered-netty-server now.

There is a new resources method in the netty-server module's Http and Https objects. By default, this handler will pass netty MessageEvents upstream if a file can not be resolved. To return NotFound or Forbidden responses for stand-alone static resource servers, use Http(...).resources(url, passOnFail = false)

netty-server Http and Https objects now define local and anylocal methods for binding to loopback interfaces

Headers parsed as Dates should now be parsed using a US Locale to avoid potentional conflict when parsing dates

Unfiltered is a toolkit for servicing HTTP requests in Scala.

Filed under  //   Scala 2.8.0   Scala 2.8.1   Scala 2.9.0   Scala 2.9.0-1   Scala 2.9.1   Unfiltered   net.databinder  

Unfiltered 0.4.1

GZip Response Kit

Encodes responses with GZip for requests that appear to support it. Can be applied to any intent, e.g.:

val zippingEcho = unfiltered.filter.Planify {
  unfiltered.kit.GZip {
    case Path(path) => ResponseString(path)
  }
}

Thanks to gerdriesselmann for the inspiration!

HttpResponse Refactoring

To support the GZIPOutputStream and FilterOutputStream subclasses generally, direct access to the Writer of a backend is no longer encouraged by the HttpResponse binding. Instead the ResponseWriter creates its own OutputStreamWriter using any filter stream and charset configured by preceding response functions.

Applications that were already using ResponseWriter and its subclasses like ResponseString will not require any changes.

Other Improvements

  • Accepts-Encoding matchers for GZip and other encodings, contributed by chrislewis
  • Path.apply to get path directly (not as an extractor)
  • Additional conversion functions in unfiltered.response.Params

Dependency Updates

  • lift-json 2.3 for Scala 2.8, 2.4-M3 for Scala 2.9

Unfiltered is a toolkit for servicing HTTP requests in Scala.