Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Misc] Make the XWiki 14.x functional docker tests work on Jetty 9.4.x
- Loading branch information
Showing
2 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...orm-core/xwiki-platform-test/xwiki-platform-test-docker/src/main/resources/jetty9-web.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_9_0.dtd"> | ||
|
||
<!-- | ||
* See the NOTICE file distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of | ||
* the License, or (at your option) any later version. | ||
* | ||
* This software is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this software; if not, write to the Free | ||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
--> | ||
|
||
<Configure class="org.eclipse.jetty.webapp.WebAppContext"> | ||
<!-- In order to avoid getting a "java.lang.IllegalStateException: Form too large" error when editing large page in | ||
XWiki we need to tell Jetty to allow for large content since by default it only allows for 20K. We do this by | ||
passing the "org.eclipse.jetty.server.Request.maxFormContentSize" attribute. | ||
Note 1: Setting this value too high can leave your server vulnerable to denial of service attacks. | ||
Note 2: We're setting it here instead of in Jetty's XML configuration files so that the XWiki WAR can be used | ||
in any Jetty config and work out of the box. | ||
--> | ||
<Set name="maxFormContentSize">1000000</Set> | ||
<!-- Increasing the maxFormKeys in order to be able to import correctly a full wiki (more than 1000 pages in 11.10). | ||
The import should be fixed at a point to allow importing everything without creating a form with a field by page. | ||
Once done this configuration can be removed. See https://jira.xwiki.org/browse/XWIKI-11597 for a follow up. --> | ||
<Set name="maxFormKeys">2000</Set> | ||
|
||
<!-- Tell jetty that javax.mail should be something that is invisible to the user, but if it's provided inside the | ||
webapp use that instead (this is the case for XWiki). This is needed for work around issue | ||
https://github.com/appropriate/docker-jetty/issues/108. Note that we don't have this problem in the XWiki | ||
Standalone packaging since we create a custom distribution of Jetty and we don't include the Jetty "mail" | ||
module. However we have the problem in our functional Docker-based tests where we use the official Jetty | ||
image. --> | ||
<!-- Note: In Jetty 10+ it's no longer necessary to have this hack. Once all the Jetty version we use are >= 10.0 | ||
then we'll be able to remove this file. --> | ||
<Call name="getSystemClasspathPattern"> | ||
<Call name="add"> | ||
<Arg>-javax.mail.</Arg> | ||
</Call> | ||
</Call> | ||
<Call name="getServerClasspathPattern"> | ||
<Call name="add"> | ||
<Arg>javax.mail.</Arg> | ||
</Call> | ||
</Call> | ||
|
||
</Configure> |