This is an automated email from the ASF dual-hosted git repository.
sergeyb pushed a commit to branch 3.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/3.1.x-fixes by this push:
new 4a0ff3e Avoid overriding a custom host value in Swagger2Feature
4a0ff3e is described below
commit 4a0ff3efb88366c71b026c061d7a18d5a98d1190
Author: Sergey Beryozkin <[email protected]>
AuthorDate: Mon Oct 23 10:42:28 2017 +0100
Avoid overriding a custom host value in Swagger2Feature
---
.../src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java
b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java
index ec0960a..9e6b64c 100644
---
a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java
+++
b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java
@@ -446,7 +446,9 @@ public class Swagger2Feature extends AbstractSwaggerFeature
{
// get the path part
URI u = URI.create(address);
setBasePath(u.getPath());
- setHost(u.getPort() < 0 ? u.getHost() : u.getHost() + ":" +
u.getPort());
+ if (getHost() == null) {
+ setHost(u.getPort() < 0 ? u.getHost() : u.getHost() + ":" +
u.getPort());
+ }
} else {
setBasePath(address);
}
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].