Don't include bogus powered by header

This commit is contained in:
James Agnew 2018-05-23 13:12:27 -04:00
parent a3687e446e
commit 0544692dde
1 changed files with 4 additions and 2 deletions

View File

@ -158,8 +158,10 @@ public class RestfulServer extends HttpServlet implements IRestfulServer<Servlet
* </p>
*/
public void addHeadersToResponse(HttpServletResponse theHttpResponse) {
String b = createPoweredByHeader();
theHttpResponse.addHeader(Constants.POWERED_BY_HEADER, b);
String poweredByHeader = createPoweredByHeader();
if (isNotBlank(poweredByHeader)) {
theHttpResponse.addHeader(Constants.POWERED_BY_HEADER, poweredByHeader);
}
}
private void addLocationHeader(RequestDetails theRequest, HttpServletResponse theResponse, MethodOutcome response, String headerLocation, String resourceName) {