partally implemented https://issues.jboss.org/browse/RAILO-45