Skip to content

Commit 7a78d4c

Browse files
committed
Improved: Update build.gradle to the latest dependencies
(OFBIZ-11603) Replaces deprecated calls Conflicts handled by hand CrossSubdomainSessionValve.java
1 parent 5ddb2b2 commit 7a78d4c

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
import org.apache.catalina.ha.ClusterManager;
5151
import org.apache.catalina.ha.tcp.ReplicationValve;
5252
import org.apache.catalina.ha.tcp.SimpleTcpCluster;
53-
import org.apache.catalina.loader.WebappLoader;
5453
import org.apache.catalina.startup.ContextConfig;
5554
import org.apache.catalina.startup.Tomcat;
5655
import org.apache.catalina.tribes.group.GroupChannel;
@@ -505,7 +504,7 @@ private StandardContext prepareContext(Host host, ContainerConfig.Configuration
505504
context.addLifecycleListener(new ContextConfig());
506505
context.setJ2EEApplication("OFBiz");
507506
context.setJ2EEServer("OFBiz Container");
508-
context.setLoader(new WebappLoader(Thread.currentThread().getContextClassLoader()));
507+
context.setParentClassLoader(Thread.currentThread().getContextClassLoader());
509508
context.setDocBase(location);
510509
context.setReloadable(ContainerConfig.getPropertyValue(configuration, "apps-context-reloadable", false));
511510
context.setDistributable(contextIsDistributable);

framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CrossSubdomainSessionValve.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ protected void replaceCookie(Request request, Response response, Cookie cookie)
115115
if (mimeHeaders.getName(i).equals("Set-Cookie")) {
116116
MessageBytes value = mimeHeaders.getValue(i);
117117
if (value.indexOf(cookie.getName()) >= 0) {
118-
String newCookieValue = request.getContext().getCookieProcessor().generateHeader(newCookie);
118+
String newCookieValue = request.getContext().getCookieProcessor().generateHeader(newCookie, request);
119119
if (Debug.verboseOn()) Debug.logVerbose("CrossSubdomainSessionValve: old Set-Cookie value: " + value.toString(), module);
120120
if (Debug.verboseOn()) Debug.logVerbose("CrossSubdomainSessionValve: new Set-Cookie value: " + newCookieValue, module);
121121
value.setString(newCookieValue);

0 commit comments

Comments
 (0)