Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ProActive
scheduling
Commits
9216b163
Unverified
Commit
9216b163
authored
Aug 03, 2020
by
Mael Audren de kerdrel
Committed by
GitHub
Aug 03, 2020
Browse files
Merge branch 'master' into dsUser
parents
b9c6a53a
158cf72c
Changes
4
Hide whitespace changes
Inline
Side-by-side
rest/rest-server/build.gradle
View file @
9216b163
...
...
@@ -61,6 +61,7 @@ dependencies {
runtime
'org.eclipse.jetty.websocket:websocket-server:9.2.29.v20191105'
runtime
'org.eclipse.jetty:jetty-webapp:9.2.29.v20191105'
runtime
'org.eclipse.jetty:jetty-util:9.2.29.v20191105'
runtime
'org.eclipse.jetty:jetty-rewrite:9.2.29.v20191105'
runtime
"org.objectweb.proactive:programming-extension-pamr:${programmingVersion}"
...
...
scheduler/scheduler-server/build.gradle
View file @
9216b163
...
...
@@ -18,6 +18,7 @@ dependencies {
compile
'org.eclipse.jetty:jetty-webapp:9.2.29.v20191105'
compile
'org.eclipse.jetty:jetty-rewrite:9.2.29.v20191105'
compile
'org.eclipse.jetty:jetty-util:9.2.29.v20191105'
compile
"org.objectweb.proactive:programming-core:${programmingVersion}"
compile
project
(
':common:common-api'
)
...
...
scheduler/scheduler-server/src/main/java/org/ow2/proactive/utils/JettyStarter.java
View file @
9216b163
...
...
@@ -409,6 +409,14 @@ public class JettyStarter {
// The following setting allows to avoid conflicts between server jackson jars and individual war jackson versions.
webApp
.
addServerClass
(
"com.fasterxml.jackson."
);
webApp
.
addServerClass
(
"com.google.gson."
);
if
(
contextPath
.
contains
(
"cloud-automation-service"
))
{
// Make jetty.util not overridable and not hidden for cloud-automation
// as jetty websocket is loaded from the system class loader and uses jetty.util
// Otherwise, cloud-automation-service will not be able to use SslContextFactory
// see https://www.eclipse.org/lists/jetty-dev/msg03096.html for the same issue report
webApp
.
prependServerClass
(
"-org.eclipse.jetty.util."
);
webApp
.
prependSystemClass
(
"org.eclipse.jetty.util."
);
}
webApp
.
setContextPath
(
contextPath
);
webApp
.
setVirtualHosts
(
virtualHost
);
return
webApp
;
...
...
scheduler/scheduler-server/src/main/java/org/ow2/proactive/utils/PCAProxyRule.java
View file @
9216b163
...
...
@@ -140,12 +140,22 @@ public class PCAProxyRule extends Rule implements Rule.ApplyURI {
logger
.
debug
(
String
.
format
(
"Rewrote %s to %s"
,
target
,
newTarget
));
}
referrerCache
.
put
(
target
,
endpointPath
);
if
(
request
.
getMethod
().
equals
(
HttpMethod
.
GET
.
asString
()))
{
if
(
HttpMethod
.
GET
.
is
(
request
.
getMethod
()))
{
redirectGetRequest
(
target
,
endpointPath
,
request
,
response
,
newTarget
);
}
return
newTarget
;
}
else
{
logger
.
trace
(
"Target already contains endpoint"
);
if
(!
target
.
startsWith
(
endpointPath
))
{
// endpoint is in the middle of the path (who did this?), let's bring it on top
// NOTE: we don't store this in the referer cache
target
=
target
.
replace
(
endpointPath
,
""
);
String
newTarget
=
endpointPath
.
substring
(
0
,
endpointPath
.
length
()
-
1
)
+
target
;
if
(
HttpMethod
.
GET
.
is
(
request
.
getMethod
()))
{
redirectGetRequest
(
target
,
endpointPath
,
request
,
response
,
newTarget
);
}
return
newTarget
;
}
}
return
target
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment