From d7c173ccfd20a4fe12b820d561af1ef871d51dd6 Mon Sep 17 00:00:00 2001 From: Daniel Unfried Date: Wed, 19 Nov 2014 15:28:47 +0100 Subject: [PATCH] Remove Request#setConnectionKeepAlive() --- src/main/java/org/scribe/model/Request.java | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/main/java/org/scribe/model/Request.java b/src/main/java/org/scribe/model/Request.java index e48578e21..950ded882 100644 --- a/src/main/java/org/scribe/model/Request.java +++ b/src/main/java/org/scribe/model/Request.java @@ -31,7 +31,6 @@ public class Request private HttpURLConnection connection; private String charset; private byte[] bytePayload = null; - private boolean connectionKeepAlive = false; private boolean followRedirects = true; private Long connectTimeout = null; private Long readTimeout = null; @@ -81,7 +80,6 @@ private void createConnection() throws IOException String completeUrl = getCompleteUrl(); if (connection == null) { - System.setProperty("http.keepAlive", connectionKeepAlive ? "true" : "false"); connection = (HttpURLConnection) new URL(completeUrl).openConnection(); connection.setInstanceFollowRedirects(followRedirects); } @@ -350,17 +348,6 @@ public void setCharset(String charsetName) this.charset = charsetName; } - /** - * Sets whether the underlying Http Connection is persistent or not. - * - * @see http://download.oracle.com/javase/1.5.0/docs/guide/net/http-keepalive.html - * @param connectionKeepAlive - */ - public void setConnectionKeepAlive(boolean connectionKeepAlive) - { - this.connectionKeepAlive = connectionKeepAlive; - } - /** * Sets whether the underlying Http Connection follows redirects or not. *