Skip to content

Commit

Permalink
Preparing release of version 1.0.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
klakegg committed Aug 15, 2018
1 parent 40f27c0 commit 344c4db
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# Changelog


## Next release

_Stay tuned._


## 1.0.4

* Throwing explicit exceptions in SbdhReader when information is not provided.
* Fixing functionality in peppol-publisher.
* Updated list of ICDs.


## 1.0.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void handleServiceGroup(HttpServletRequest req, HttpServletResponse resp,
ParticipantIdentifier participantIdentifier = ParticipantIdentifier.parse(participantParam);

publisherService.serviceGroup(resp.getOutputStream(), req.getParameter("syntax"),
URI.create(req.getScheme()+"://"+req.getServerName()+":"+req.getServerPort()+"/"), participantIdentifier);
URI.create(createPublisherRoot(req)), participantIdentifier);
}

public void handleMetadataProvider(HttpServletRequest req, HttpServletResponse resp,
Expand All @@ -102,4 +102,13 @@ public void handleMetadataProvider(HttpServletRequest req, HttpServletResponse r
publisherService.metadataProvider(resp.getOutputStream(), req.getParameter("syntax"),
participantIdentifier, documentTypeIdentifier);
}

private String createPublisherRoot(HttpServletRequest req) {
if ((req.getServerPort() == 80 && req.getScheme().equalsIgnoreCase("http")) ||
(req.getServerPort() == 443 && req.getScheme().equalsIgnoreCase("https"))) {
return req.getScheme() + "://" + req.getServerName() + "/";
} else {
return req.getScheme() + "://" + req.getServerName() + ":" + req.getServerPort() + "/";
}
}
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.5</version>
<version>4.5.6</version>
</dependency>

<!-- DNS -->
Expand Down

0 comments on commit 344c4db

Please sign in to comment.