Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
d-wsmap
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
Géomatique
Descartes
services web
d-wsmap
Commits
d6199d21
Commit
d6199d21
authored
2 years ago
by
Gaelle.Barris
Browse files
Options
Downloads
Patches
Plain Diff
Ajout logs
parent
68dc677b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pom.xml
+1
-1
1 addition, 1 deletion
pom.xml
src/main/java/fr/gouv/siig/descartes/services/descartes/tools/HttpSender.java
+11
-5
11 additions, 5 deletions
...v/siig/descartes/services/descartes/tools/HttpSender.java
with
12 additions
and
6 deletions
pom.xml
+
1
−
1
View file @
d6199d21
...
...
@@ -11,7 +11,7 @@
</parent>
<groupId>
fr.gouv.siig.descartes
</groupId>
<artifactId>
services
</artifactId>
<version>
0.0.2
0
</version>
<version>
0.0.2
1
</version>
<packaging>
war
</packaging>
<name>
Descartes - Module D-WsMap
</name>
<description>
Services web de Descartes
</description>
...
...
This diff is collapsed.
Click to expand it.
src/main/java/fr/gouv/siig/descartes/services/descartes/tools/HttpSender.java
+
11
−
5
View file @
d6199d21
...
...
@@ -262,16 +262,20 @@ public class HttpSender {
return
result
;
}
private
static
boolean
hasProxy
(
String
globalURL
,
HttpProxy
httpProxy
)
throws
HttpSenderException
{
private
static
boolean
hasProxy
(
String
globalURL
,
HttpProxy
httpProxy
)
throws
HttpSenderException
{
boolean
proxy
=
false
;
if
(
httpProxy
!=
null
&&
httpProxy
.
getHost
()
!=
null
&&
httpProxy
.
getPort
()!=
0
)
{
if
(
httpProxy
!=
null
&&
httpProxy
.
getHost
()
!=
null
&&
!
httpProxy
.
getHost
().
equalsIgnoreCase
(
""
)
&&
httpProxy
.
getPort
()!=
0
)
{
proxy
=
true
;
LOGGER
.
debug
(
"***** DESCARTES HttpSender hasProxy urlName: "
+
globalURL
);
try
{
if
(
httpProxy
.
getUrlExceptions
()
!=
null
)
{
URL
url
=
new
URL
(
globalURL
);
if
(
httpProxy
.
getUrlExceptions
()
!=
null
&&
!
httpProxy
.
getUrlExceptions
().
equalsIgnoreCase
(
""
))
{
LOGGER
.
debug
(
"***** DESCARTES HttpSender hasProxy httpProxy.getUrlExceptions(): "
+
httpProxy
.
getUrlExceptions
());
URL
url
=
new
URL
(
globalURL
);
String
host
=
url
.
getHost
();
LOGGER
.
debug
(
"***** DESCARTES HttpSender hasProxy host: "
+
host
);
String
[]
noProxyURLs
=
httpProxy
.
getUrlExceptions
().
split
(
";"
);
for
(
String
noProxyURL
:
noProxyURLs
)
{
LOGGER
.
debug
(
"***** DESCARTES HttpSender hasProxy noProxyURL: "
+
noProxyURL
);
if
(
host
.
startsWith
(
noProxyURL
)
||
host
.
endsWith
(
noProxyURL
))
{
proxy
=
false
;
break
;
...
...
@@ -279,9 +283,11 @@ public class HttpSender {
}
}
}
catch
(
MalformedURLException
e
)
{
throw
new
HttpSenderException
(
"URL non valide"
+
globalURL
,
e
);
LOGGER
.
debug
(
"***** DESCARTES HttpSender hasProxy MalformedURLException: "
+
globalURL
,
e
);
throw
new
HttpSenderException
(
"URL non valide : "
+
globalURL
,
e
);
}
}
LOGGER
.
debug
(
"***** DESCARTES HttpSender hasProxy Proxy config: "
+
proxy
);
return
proxy
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment