spray/spray — pull request #560 by theon (2013-10-06 19:00:44+00:00)
Title: ! can: Implement redirection following (issue #132)

Implemented redirection following for `3xx` responses in the spray-can layer.

Both relative and absolute URLs in the `Location` header are supported. Despite the HTTP spec [only stating](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30) that absolute URLs need be supported, it seems that most clients do support relative URLs also.

Added details to the docs:

> Automatic redirection following for 3xx responses is supported via setting the ``spray.can.host-connector.follow-redirects`` to ``true``. By default this is set to ``false``, which means that 3xx responses are returned to the user.
>
> Since this setting is at the host level, it is possible to enable redirection following for certain hosts and disable for others by using host specific configuration as specified in [Request-level API](http://spray.io/documentation/1.1-M8/spray-can/http-client/request-level/).
>
> To prevent the following of infinite redirect loops, the ``spray.can.client.max-redirects`` settings defines the maximum number of redirects spray-client will follow. The default is 5.