December 10th, 2013 by Lincoln Baxter III

Rewrite 2.0.9.Final and PrettyTime 3.2.3.Final Released (Introducing Proxy Support)

Rewrite 2.0.9.Final

We are proud to announce the availability of Rewrite 2.0.9.Final, which introduces “rewrite-config-proxy”, fixes several minor issues, and adds support for Response.isCommitted(), making it far simpler to perform certain operations if the response has already been committed by a prior rule or 3rd party servlet filter.

rewrite-config-proxy

Provides an easy-to-use Operation that allows any inbound request to be proxied to another URL – even on a different server. Headers, cookies, etc, are preserved:

To use this configuration extension, you will need to add it to your POM file:

<dependency>
   <groupId>org.ocpsoft.rewrite</groupId>
   <artifactId>rewrite-config-proxy</artifactId>
   <version>2.0.9.Final</version>
</dependency>
Now add a rule to your ConfigurationProvider:
.addRule()
.when(Direction.isInbound())
.perform(Proxy.to("http://example.com"))

And of course, it supports parameterization:

.addRule()
.when(Direction.isInbound().and(Path.matches("/{p}")))
.perform(Proxy.to("http://example.com/{p}?foo=bar"))

response.isCommitted()

Provides a simple condition for determining whether the response has been committed or not for the current request. This is useful for aborting rewrite processing after a certain point in your configuration:
.addRule()
.when(Response.isCommitted().and(Direction.isInbound()))
.perform(Lifecycle.abort())

More issues resolved in Rewrite 2.0.9.Final:

PrettyTime 3.2.3.Final

We are proud to announce the availability of PrettyTime 3.2.3.Final, which fixes several minor issues with translation and Natural Language Parsing:

Get the updates

Get Rewrite

Get PrettyTime

Posted in Releases

Leave a Comment




Please note: In order to submit code or special characters, wrap it in

[code lang="xml"][/code]
(for your language) - or your tags will be eaten.

Please note: Comment moderation is enabled and may delay your comment from appearing. There is no need to resubmit your comment.