Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2012-06-25 16:58:39 +0000
committerKevin Sawicki2012-06-25 16:58:39 +0000
commit39d3e9f9e24931241cf5dc5a5e8ec1700a6c36ef (patch)
treed228a146a0c6d592f62f25b28f6df5374b409894
parent3d0a05b20c44fbdc4d71f79cb3f8171232071808 (diff)
downloadegit-github-39d3e9f9e24931241cf5dc5a5e8ec1700a6c36ef.tar.gz
egit-github-39d3e9f9e24931241cf5dc5a5e8ec1700a6c36ef.tar.xz
egit-github-39d3e9f9e24931241cf5dc5a5e8ec1700a6c36ef.zip
Set Content-Length request header explicitly to zero
Previously setFixedLengthStreamingMode(0) was called when sending null parameters. This appears to have no affect on Android when the intended behavior was to have "Content-Length" set to "0" in the request headers. Change-Id: Iabdacf9c2e64915e6106de4d6d4b99e57acb5db2
-rw-r--r--org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/client/GitHubClient.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/client/GitHubClient.java b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/client/GitHubClient.java
index 2996181c..824a6eb6 100644
--- a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/client/GitHubClient.java
+++ b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/client/GitHubClient.java
@@ -579,8 +579,10 @@ public class GitHubClient {
// Ignored
}
}
- } else
+ } else {
request.setFixedLengthStreamingMode(0);
+ request.setRequestProperty("Content-Length", "0");
+ }
}
private <V> V sendJson(final HttpURLConnection request,

Back to the top