Skip to content

Commit

Permalink
Merge pull request #42 from jordi-farre/master
Browse files Browse the repository at this point in the history
[master]: Apache HttpClient will set Host header automatically
  • Loading branch information
harwey committed Nov 19, 2020
2 parents 40279b9 + 956990c commit 1102886
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/main/java/org/cups4j/operations/IppHttp.java
Expand Up @@ -18,7 +18,6 @@ public final class IppHttp {
private static final int MAX_CONNECTION_BUFFER = 20;

private static final int CUPSTIMEOUT = Integer.parseInt(System.getProperty("cups4j.timeout", "10000"));
private static final String CUPSHOST = System.getProperty("cups4j.ourhostname", "localhost");

private static final RequestConfig requestConfig = RequestConfig.custom()
.setSocketTimeout(CUPSTIMEOUT).setConnectTimeout(CUPSTIMEOUT)
Expand Down Expand Up @@ -47,9 +46,6 @@ public static void setHttpHeaders(HttpPost httpPost, CupsPrinter targetPrinter,
} else {
httpPost.addHeader("target-group", targetPrinter.getName());
}
if (CUPSHOST != null && !"".equals(CUPSHOST)) {
httpPost.addHeader("Host", CUPSHOST);
}
httpPost.setConfig(requestConfig);

if (creds != null && StringUtils.isNotBlank(creds.getUserid())
Expand Down

0 comments on commit 1102886

Please sign in to comment.