Author: remy.maucherat(a)jboss.com
Date: 2012-01-02 12:49:10 -0500 (Mon, 02 Jan 2012)
New Revision: 1907
Modified:
trunk/java/org/apache/catalina/connector/Request.java
trunk/java/org/apache/catalina/session/StandardSession.java
trunk/webapps/docs/changelog.xml
Log:
Two Servlet 3.0a updates.
Modified: trunk/java/org/apache/catalina/connector/Request.java
===================================================================
--- trunk/java/org/apache/catalina/connector/Request.java 2012-01-02 13:46:14 UTC (rev
1906)
+++ trunk/java/org/apache/catalina/connector/Request.java 2012-01-02 17:49:10 UTC (rev
1907)
@@ -2962,10 +2962,20 @@
if (!("multipart/form-data".equals(contentType)))
throw new
ServletException(sm.getString("coyoteRequest.notMultipart"));
+ File location = null;
+ if (config.getLocation() == null || config.getLocation().length() == 0) {
+ location = ((File) context.getServletContext().getAttribute(
+ ServletContext.TEMPDIR));
+ } else {
+ location = new File(config.getLocation());
+ if (!location.isAbsolute()) {
+ location = new File((File)
context.getServletContext().getAttribute(ServletContext.TEMPDIR),
+ config.getLocation()).getAbsoluteFile();
+ }
+ }
+
DiskFileItemFactory factory = new DiskFileItemFactory();
- if (config.getLocation() != null) {
- factory.setRepository(new File(config.getLocation()));
- }
+ factory.setRepository(location);
if (config.getFileSizeThreshold() > 0) {
factory.setSizeThreshold(config.getFileSizeThreshold());
}
Modified: trunk/java/org/apache/catalina/session/StandardSession.java
===================================================================
--- trunk/java/org/apache/catalina/session/StandardSession.java 2012-01-02 13:46:14 UTC
(rev 1906)
+++ trunk/java/org/apache/catalina/session/StandardSession.java 2012-01-02 17:49:10 UTC
(rev 1907)
@@ -493,9 +493,6 @@
public void setMaxInactiveInterval(int interval) {
this.maxInactiveInterval = interval;
- if (isValid && interval == 0) {
- expire();
- }
}
@@ -581,7 +578,7 @@
return true;
}
- if (maxInactiveInterval >= 0) {
+ if (maxInactiveInterval > 0) {
int offset = (int) (System.currentTimeMillis() - creationTime);
int timeIdle = (offset - thisAccessedTime) / 1000;
if (timeIdle >= maxInactiveInterval) {
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2012-01-02 13:46:14 UTC (rev 1906)
+++ trunk/webapps/docs/changelog.xml 2012-01-02 17:49:10 UTC (rev 1907)
@@ -16,6 +16,16 @@
<body>
+<section name="JBoss Web 7.0.8.Final (remm)">
+ <subsection name="Catalina">
+ <changelog>
+ <fix>
+ Updates for Servlet 3.0a. (markt, remm)
+ </fix>
+ </changelog>
+ </subsection>
+</section>
+
<section name="JBoss Web 7.0.7.Final (remm)">
<subsection name="Catalina">
<changelog>