JBossWeb SVN: r362 - sandbox/webapps/src.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2007-12-03 10:25:04 -0500 (Mon, 03 Dec 2007)
New Revision: 362
Modified:
sandbox/webapps/src/TestFilter.java
sandbox/webapps/src/TestServlet.java
Log:
UTF8 tests (for firefox example that do UTF-8 but don't tell it).
Modified: sandbox/webapps/src/TestFilter.java
===================================================================
--- sandbox/webapps/src/TestFilter.java 2007-12-03 14:48:54 UTC (rev 361)
+++ sandbox/webapps/src/TestFilter.java 2007-12-03 15:25:04 UTC (rev 362)
@@ -66,6 +66,14 @@
HttpServletRequest req = (HttpServletRequest)request;
HttpServletResponse res = (HttpServletResponse)response;
+ // Don't call it for the TestServlet servlet
+ String path = req.getServletPath();
+ System.out.println("TestFilter.doFilter: " + path);
+ if (path.compareTo("/TestServlet") == 0) {
+ chain.doFilter(request, response);
+ return;
+ }
+
// get action
String action = req.getParameter("do");
if (action == null) {
Modified: sandbox/webapps/src/TestServlet.java
===================================================================
--- sandbox/webapps/src/TestServlet.java 2007-12-03 14:48:54 UTC (rev 361)
+++ sandbox/webapps/src/TestServlet.java 2007-12-03 15:25:04 UTC (rev 362)
@@ -69,6 +69,7 @@
}
response.setContentType("text/html");
+ response.setCharacterEncoding("UTF8");
PrintWriter out = response.getWriter();
out.println("<html>");
@@ -199,9 +200,20 @@
out.println("</form>");
out.print("<p><a href=\"");
- out.print(response.encodeURL("TestServlet?dataname=foo&datavalue=bar"));
+ String url = "TestServlet?dataname=" + dataName + "&datavalue=" + dataValue;
+ out.print(response.encodeURL(url));
out.println("\" >URL encoded </a>");
+ out.print("<p><a href=\"");
+ url = "TestServlet?dataname=" + dataName + "&datavalue=èéâçûàAAA";
+ out.print(response.encodeURL(url));
+ out.println("\" >URL encoded with datavalue=èéâçûàAAA</a>");
+
+ out.print("<p><a href=\"");
+ url = "TestServlet?dataname=" + dataName + "&datavalue=عربي";
+ out.print(response.encodeURL(url));
+ out.println("\" >URL encoded with datavalue=عربي</a>");
+
out.println("</body>");
out.println("</html>");
@@ -217,6 +229,7 @@
HttpServletResponse response)
throws IOException, ServletException
{
+ request.setCharacterEncoding("UTF-8");
doGet(request, response);
}
17 years, 1 month
JBossWeb SVN: r361 - branches/2.0.x.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-12-03 09:48:54 -0500 (Mon, 03 Dec 2007)
New Revision: 361
Modified:
branches/2.0.x/build.properties.default
Log:
- Fix version number.
Modified: branches/2.0.x/build.properties.default
===================================================================
--- branches/2.0.x/build.properties.default 2007-12-03 14:48:32 UTC (rev 360)
+++ branches/2.0.x/build.properties.default 2007-12-03 14:48:54 UTC (rev 361)
@@ -12,7 +12,7 @@
# ----- Vesion Control Flags -----
version.major=2
version.minor=0
-version.build=0
+version.build=2
version.patch=dev
# ----- Vesion Control Flags -----
17 years, 1 month
JBossWeb SVN: r360 - branches/JBOSSWEB_2_0_0_GA_CP.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-12-03 09:48:32 -0500 (Mon, 03 Dec 2007)
New Revision: 360
Modified:
branches/JBOSSWEB_2_0_0_GA_CP/build.properties.default
Log:
- Fix version number.
Modified: branches/JBOSSWEB_2_0_0_GA_CP/build.properties.default
===================================================================
--- branches/JBOSSWEB_2_0_0_GA_CP/build.properties.default 2007-12-03 14:38:23 UTC (rev 359)
+++ branches/JBOSSWEB_2_0_0_GA_CP/build.properties.default 2007-12-03 14:48:32 UTC (rev 360)
@@ -13,7 +13,7 @@
version.major=2
version.minor=0
version.build=0
-version.patch=GA_CP01
+version.patch=GA_CP
# ----- Vesion Control Flags -----
jboss.version.major=5
17 years, 1 month
JBossWeb SVN: r359 - in branches: JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/connector and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-12-03 09:38:23 -0500 (Mon, 03 Dec 2007)
New Revision: 359
Modified:
branches/2.0.x/src/share/classes/org/apache/catalina/connector/Request.java
branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/connector/Request.java
Log:
- Fix bad method refactoring.
Modified: branches/2.0.x/src/share/classes/org/apache/catalina/connector/Request.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/connector/Request.java 2007-12-03 14:36:53 UTC (rev 358)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/connector/Request.java 2007-12-03 14:38:23 UTC (rev 359)
@@ -2466,6 +2466,7 @@
context.getLogger().debug(
sm.getString("coyoteRequest.parseParameters"), e);
}
+ return;
}
parameters.processParameters(formData, 0, len);
}
Modified: branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/connector/Request.java
===================================================================
--- branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/connector/Request.java 2007-12-03 14:36:53 UTC (rev 358)
+++ branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/connector/Request.java 2007-12-03 14:38:23 UTC (rev 359)
@@ -2449,6 +2449,7 @@
context.getLogger().debug(
sm.getString("coyoteRequest.parseParameters"), e);
}
+ return;
}
parameters.processParameters(formData, 0, len);
}
17 years, 1 month
JBossWeb SVN: r358 - trunk/java/org/apache/catalina/connector.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-12-03 09:36:53 -0500 (Mon, 03 Dec 2007)
New Revision: 358
Modified:
trunk/java/org/apache/catalina/connector/Request.java
Log:
- Fix bad method refactoring.
Modified: trunk/java/org/apache/catalina/connector/Request.java
===================================================================
--- trunk/java/org/apache/catalina/connector/Request.java 2007-12-03 11:19:12 UTC (rev 357)
+++ trunk/java/org/apache/catalina/connector/Request.java 2007-12-03 14:36:53 UTC (rev 358)
@@ -2524,6 +2524,7 @@
context.getLogger().debug(
sm.getString("coyoteRequest.parseParameters"), e);
}
+ return;
}
parameters.processParameters(formData, 0, len);
}
17 years, 1 month
JBossWeb SVN: r357 - in trunk: java/org/apache/catalina/core and 2 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2007-12-03 06:19:12 -0500 (Mon, 03 Dec 2007)
New Revision: 357
Modified:
trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java
trunk/java/org/apache/catalina/core/StandardWrapper.java
trunk/java/org/apache/catalina/servlets/WebdavServlet.java
trunk/webapps/docs/changelog.xml
Log:
- Port 3 patches, the most important being a fix for form with conditional headers.
Modified: trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java
===================================================================
--- trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java 2007-11-29 16:10:02 UTC (rev 356)
+++ trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java 2007-12-03 11:19:12 UTC (rev 357)
@@ -402,12 +402,20 @@
MimeHeaders rmh = request.getCoyoteRequest().getMimeHeaders();
rmh.recycle();
+ boolean cachable = "GET".equalsIgnoreCase(saved.getMethod()) ||
+ "HEAD".equalsIgnoreCase(saved.getMethod());
Iterator names = saved.getHeaderNames();
while (names.hasNext()) {
String name = (String) names.next();
- Iterator values = saved.getHeaderValues(name);
- while (values.hasNext()) {
- rmh.addValue(name).setString( (String)values.next() );
+ // The browser isn't expecting this conditional response now.
+ // Assuming that it can quietly recover from an unexpected 412.
+ // BZ 43687
+ if(!("If-Modified-Since".equalsIgnoreCase(name) ||
+ (cachable && "If-None-Match".equalsIgnoreCase(name)))) {
+ Iterator values = saved.getHeaderValues(name);
+ while (values.hasNext()) {
+ rmh.addValue(name).setString( (String)values.next() );
+ }
}
}
Modified: trunk/java/org/apache/catalina/core/StandardWrapper.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardWrapper.java 2007-11-29 16:10:02 UTC (rev 356)
+++ trunk/java/org/apache/catalina/core/StandardWrapper.java 2007-12-03 11:19:12 UTC (rev 357)
@@ -1628,7 +1628,7 @@
broadcaster.sendNotification(notification);
}
} catch( Exception ex ) {
- log.info("Error registering servlet with jmx " + this);
+ log.info("Error registering servlet with jmx " + this, ex);
}
if (isJspServlet) {
@@ -1643,7 +1643,7 @@
.registerComponent(instance, jspMonitorON, null);
} catch( Exception ex ) {
log.info("Error registering JSP monitoring with jmx " +
- instance);
+ instance, ex);
}
}
}
Modified: trunk/java/org/apache/catalina/servlets/WebdavServlet.java
===================================================================
--- trunk/java/org/apache/catalina/servlets/WebdavServlet.java 2007-11-29 16:10:02 UTC (rev 356)
+++ trunk/java/org/apache/catalina/servlets/WebdavServlet.java 2007-12-03 11:19:12 UTC (rev 357)
@@ -66,10 +66,52 @@
/**
* Servlet which adds support for WebDAV level 2. All the basic HTTP requests
- * are handled by the DefaultServlet.
+ * are handled by the DefaultServlet. The WebDAVServlet must not be used as the
+ * default servlet (ie mapped to '/') as it will not work in this configuration.
+ * To enable WebDAV for a context add the following to web.xml:<br/><code>
+ * <servlet><br/>
+ * <servlet-name>webdav</servlet-name><br/>
+ * <servlet-class>org.apache.catalina.servlets.WebdavServlet</servlet-class><br/>
+ * <init-param><br/>
+ * <param-name>debug</param-name><br/>
+ * <param-value>0</param-value><br/>
+ * </init-param><br/>
+ * <init-param><br/>
+ * <param-name>listings</param-name><br/>
+ * <param-value>true</param-value><br/>
+ * </init-param><br/>
+ * </servlet><br/>
+ * <servlet-mapping><br/>
+ * <servlet-name>webdav</servlet-name><br/>
+ * <url-pattern>/*</url-pattern><br/>
+ * </servlet-mapping>
+ * </code>
+ * <p/>
+ * This will enable read only access. To enable read-write access add:<br/>
+ * <code>
+ * <init-param><br/>
+ * <param-name>readonly</param-name><br/>
+ * <param-value>false</param-value><br/>
+ * </init-param><br/>
+ * </code>
+ * <p/>
+ * To make the content editable via a different URL, using the following
+ * mapping:<br/>
+ * <code>
+ * <servlet-mapping><br/>
+ * <servlet-name>webdav</servlet-name><br/>
+ * <url-pattern>/webdavedit/*</url-pattern><br/>
+ * </servlet-mapping>
+ * </code>
+ * <p/>
+ * Don't forget to secure access appropriately to the editing URLs. With this
+ * configuration the context will be accessible to normal users as before. Those
+ * users with the necessary access will be able to edit content available via
+ * http://host:port/context/content using
+ * http://host:port/context/webdavedit/content
*
* @author Remy Maucherat
- * @version $Revision: 561186 $ $Date: 2007-07-31 01:37:47 +0200 (mar., 31 juil. 2007) $
+ * @version $Revision: 600268 $ $Date: 2007-12-02 12:09:55 +0100 (Sun, 02 Dec 2007) $
*/
public class WebdavServlet
@@ -1692,6 +1734,9 @@
}
+ // Copy was successful
+ resp.setStatus(WebdavStatus.SC_CREATED);
+
// Removing any lock-null resource which would be present at
// the destination path
lockNullResources.remove(destinationPath);
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2007-11-29 16:10:02 UTC (rev 356)
+++ trunk/webapps/docs/changelog.xml 2007-12-03 11:19:12 UTC (rev 357)
@@ -80,6 +80,22 @@
<fix>
Improve error codes returned when no host or no context is matched. (remm)
</fix>
+ <fix>
+ <bug>43706</bug>: WebDAV copy/move now returns 201 on success. Based on
+ a patch by Panagiotis Astithas. (markt)
+ </fix>
+ <fix>
+ <bug>43887</bug>: Make error messages much more helpful when illegal
+ Servlet names are used. Based on a patch provided by Mike Baranczak.
+ (markt)
+ </fix>
+ <update>
+ Improve the webDAV Servlet Javadocs to make clear that the WebDAV
+ Servlet can not be used as the default servlet. (markt)
+ </update>
+ <fix><bug>43687</bug> Remove conditional headers on Form Auth replay,
+ since the UA (esp. FireFox) isn't expecting it.
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
17 years, 1 month