--- /dev/null
+Setup URIEncoding="UTF-8" to use unversal URI encoding.
+
+http://wiki.hudson-ci.org/display/HUDSON/Tomcat
+
+Some versions of Tomcat (such as 5.0.28) uses iso-8859-1 to decode URLs, which
+is in a clear violation of the relevant RFCs. To fix this problem, add the
+following URIEncoding attribute to the connector definition in
+$TOMCAT_HOME/conf/server.xml.
+
+--- apache-tomcat-6.0.28-src/conf/server.xml~ 2010-06-29 17:33:40.000000000 +0300
++++ apache-tomcat-6.0.28-src/conf/server.xml 2010-07-20 09:12:35.045149469 +0300
+@@ -68,12 +68,14 @@
+ -->
+ <Connector port="8080" protocol="HTTP/1.1"
+ connectionTimeout="20000"
++ URIEncoding="UTF-8"
+ redirectPort="8443" />
+ <!-- A "Connector" using the shared thread pool-->
+ <!--
+ <Connector executor="tomcatThreadPool"
+ port="8080" protocol="HTTP/1.1"
+ connectionTimeout="20000"
++ URIEncoding="UTF-8"
+ redirectPort="8443" />
+ -->
+ <!-- Define a SSL HTTP/1.1 Connector on port 8443
+@@ -82,12 +84,12 @@
+ described in the APR documentation -->
+ <!--
+ <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
+- maxThreads="150" scheme="https" secure="true"
++ maxThreads="150" scheme="https" secure="true" URIEncoding="UTF-8"
+ clientAuth="false" sslProtocol="TLS" />
+ -->
+
+ <!-- Define an AJP 1.3 Connector on port 8009 -->
+- <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
++ <Connector port="8009" protocol="AJP/1.3" URIEncoding="UTF-8" redirectPort="8443" />
+
+
+ <!-- An Engine represents the entry point (within Catalina) that processes
Summary(pl.UTF-8): Serwer www i silnik Servlet/JSP będący wzorcową implementacją API Servlet %{servletapiver}/JSP %{jspapiver}
Name: tomcat
Version: 6.0.28
-Release: 1
+Release: 2
License: Apache v2.0
Group: Networking/Daemons/Java
Source0: http://www.apache.org/dist/tomcat/tomcat-6/v%{version}/src/apache-%{name}-%{version}-src.tar.gz
Source14: %{name}-context-examples.xml
Patch0: %{name}-build.xml.patch
Patch1: %{name}-extras.xml.patch
+Patch2: server.xml-URIEncoding-utf8.patch
URL: http://tomcat.apache.org/
BuildRequires: ant >= 1.5.3
BuildRequires: ant-trax
%prep
%setup -q -n apache-%{name}-%{version}-src
-
%patch0 -p0
%patch1 -p0
+%patch2 -p1
# we don't need those scripts
rm bin/*.bat
rm bin/{startup,shutdown}.sh
-cp %{SOURCE3} build.properties
+cp -a %{SOURCE3} build.properties
%build
TOPDIR=$(pwd)
-%ant -Drpm.javadir=%{_javadir} -Drpm.libdir=%{_libdir}
+%ant \
+ -Drpm.javadir=%{_javadir} \
+ -Drpm.libdir=%{_libdir}
%if %{with javadoc}
%ant -f dist.xml dist-javadoc
%ant -f extras.xml webservices
%endif
-
%install
rm -rf $RPM_BUILD_ROOT
cd output/build
$RPM_BUILD_ROOT/etc/sysconfig \
$RPM_BUILD_ROOT/etc/rc.d/init.d
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/tomcat
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/tomcat
+install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/tomcat
+cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/tomcat
cp -a conf/* $CATALINADIR/conf
install -d $CATALINADIR/conf/Catalina/localhost
-install %{SOURCE10} $CATALINADIR/conf/Catalina/localhost/ROOT.xml
-install %{SOURCE11} $CATALINADIR/conf/Catalina/localhost/docs.xml
-install %{SOURCE12} $CATALINADIR/conf/Catalina/localhost/manager.xml
-install %{SOURCE13} $CATALINADIR/conf/Catalina/localhost/host-manager.xml
-install %{SOURCE14} $CATALINADIR/conf/Catalina/localhost/examples.xml
+cp -a %{SOURCE10} $CATALINADIR/conf/Catalina/localhost/ROOT.xml
+cp -a %{SOURCE11} $CATALINADIR/conf/Catalina/localhost/docs.xml
+cp -a %{SOURCE12} $CATALINADIR/conf/Catalina/localhost/manager.xml
+cp -a %{SOURCE13} $CATALINADIR/conf/Catalina/localhost/host-manager.xml
+cp -a %{SOURCE14} $CATALINADIR/conf/Catalina/localhost/examples.xml
cp -a bin lib webapps $TOMCATDIR
cp -a temp $CATALINADIR