Skip to content

Commit

Permalink
fix maven intermittent failures during artifact downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
psakar committed Jan 18, 2019
1 parent 5aae3e4 commit c320b74
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/de/pdark/dsmp/RequestHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public class RequestHandler extends Thread
public static final Logger log = Logger.getLogger(RequestHandler.class);

public static final Logger downloadLog = Logger.getLogger("downloadLog");
public static final String KEEP_ALIVE_HEADER = "Proxy-Connection: Keep-Alive".toLowerCase();

private final Socket clientSocket;
private final Config config;
Expand Down Expand Up @@ -84,8 +85,9 @@ public void run ()
fullRequest.append (line);
fullRequest.append ('\n');

if ("Proxy-Connection: keep-alive".equals (line))
if (KEEP_ALIVE_HEADER.equals (line.toLowerCase())) {
keepAlive = true;
}

if (line.startsWith("GET "))
{
Expand Down

0 comments on commit c320b74

Please sign in to comment.