Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions 10 src/main/java/org/scribe/model/Request.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -353,13 +351,15 @@ public void setCharset(String charsetName)
/**
* Sets whether the underlying Http Connection is persistent or not.
*
* @deprecated does nothing - JVM default is left untouched.
* Set {@code http.keepAlive} system property to {@code false} for pre-deprecation behavior.
*
* @see http://download.oracle.com/javase/1.5.0/docs/guide/net/http-keepalive.html
* @param connectionKeepAlive
*/
@Deprecated
public void setConnectionKeepAlive(boolean connectionKeepAlive)
{
this.connectionKeepAlive = connectionKeepAlive;
}
{}

/**
* Sets whether the underlying Http Connection follows redirects or not.
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.