You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2018/09/16 13:27:49 UTC
svn commit: r1841006 - in
/felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal:
ConfigMetaTypeProvider.java JettyConfig.java
Author: cziegeler
Date: Sun Sep 16 13:27:48 2018
New Revision: 1841006
URL: http://svn.apache.org/viewvc?rev=1841006&view=rev
Log:
FELIX-5812 : External session id differs from internal session id
Modified:
felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/ConfigMetaTypeProvider.java
felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java
Modified: felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/ConfigMetaTypeProvider.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/ConfigMetaTypeProvider.java?rev=1841006&r1=1841005&r2=1841006&view=diff
==============================================================================
--- felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/ConfigMetaTypeProvider.java (original)
+++ felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/ConfigMetaTypeProvider.java Sun Sep 16 13:27:48 2018
@@ -22,6 +22,7 @@ import java.io.InputStream;
import java.util.ArrayList;
import java.util.zip.Deflater;
+import org.apache.felix.http.base.internal.HttpConfig;
import org.eclipse.jetty.server.handler.gzip.GzipHandler;
import org.eclipse.jetty.server.session.HouseKeeper;
import org.osgi.framework.Bundle;
@@ -411,7 +412,17 @@ class ConfigMetaTypeProvider implements
2147483647,
null, null,
getStringArray(bundle.getBundleContext().getProperty(JettyConfig.FELIX_JETTY_GZIP_EXCLUDED_MIME_TYPES))));
-
+ adList.add(new AttributeDefinitionImpl(HttpConfig.PROP_INVALIDATE_SESSION,
+ "Invalidate Container Session",
+ "If this property is set, the container session is automatically validated.",
+ HttpConfig.DEFAULT_INVALIDATE_SESSION,
+ bundle.getBundleContext().getProperty(HttpConfig.PROP_INVALIDATE_SESSION)));
+ adList.add(new AttributeDefinitionImpl(HttpConfig.PROP_UNIQUE_SESSION_ID,
+ "Unique Session Id",
+ "If this property is set, each http context gets a unique session id (derived from the container session).",
+ HttpConfig.DEFAULT_UNIQUE_SESSION_ID,
+ bundle.getBundleContext().getProperty(HttpConfig.PROP_UNIQUE_SESSION_ID)));
+
return new ObjectClassDefinition()
{
Modified: felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java?rev=1841006&r1=1841005&r2=1841006&view=diff
==============================================================================
--- felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java (original)
+++ felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java Sun Sep 16 13:27:48 2018
@@ -28,6 +28,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.zip.Deflater;
+import org.apache.felix.http.base.internal.HttpConfig;
import org.apache.felix.http.base.internal.logger.SystemLogger;
import org.eclipse.jetty.server.handler.gzip.GzipHandler;
import org.osgi.framework.BundleContext;
@@ -220,7 +221,7 @@ public final class JettyConfig
/** Felix specific property to specify whether the server should use a server-wide gzip handler (defaults to true) */
public static final String FELIX_JETTY_GZIP_HANDLER_ENABLE = "org.apache.felix.jetty.gziphandler.enable";
-
+
/** Felix specific property to specify the minimum response size to trigger dynamic compression */
public static final String FELIX_JETTY_GZIP_MIN_GZIP_SIZE = "org.apache.felix.jetty.gzip.minGzipSize";
@@ -253,7 +254,7 @@ public final class JettyConfig
/** Felix specific property to specify the excluded mime types. */
public static final String FELIX_JETTY_GZIP_EXCLUDED_MIME_TYPES = "org.apache.felix.jetty.gzip.excludedMimeTypes";
-
+
private static String validateContextPath(String ctxPath)
{
// undefined, empty, or root context path
@@ -581,7 +582,7 @@ public final class JettyConfig
return getBooleanProperty(FELIX_HTTP_REQUEST_LOG_FILE_LOG_LATENCY, false);
}
-
+
public boolean isGzipHandlerEnabled() {
return getBooleanProperty(FELIX_JETTY_GZIP_HANDLER_ENABLE, false);
}
@@ -629,7 +630,7 @@ public final class JettyConfig
public String[] getGzipExcludedMimeTypes() {
return getStringArrayProperty(FELIX_JETTY_GZIP_EXCLUDED_MIME_TYPES, new String[0]);
}
-
+
public void reset()
{
update(null);
@@ -645,6 +646,12 @@ public final class JettyConfig
{
props.put(FELIX_HTTP_SERVICE_NAME, getHttpServiceName());
}
+
+ props.put(HttpConfig.PROP_INVALIDATE_SESSION, getBooleanProperty(HttpConfig.PROP_INVALIDATE_SESSION,
+ HttpConfig.DEFAULT_INVALIDATE_SESSION));
+ props.put(HttpConfig.PROP_UNIQUE_SESSION_ID, getBooleanProperty(HttpConfig.PROP_UNIQUE_SESSION_ID,
+ HttpConfig.DEFAULT_UNIQUE_SESSION_ID));
+
addCustomServiceProperties(props);
}