diff options
author | relves | 2010-04-01 18:13:30 +0000 |
---|---|---|
committer | relves | 2010-04-01 18:13:30 +0000 |
commit | 9baf3b6ab656241205751a4522e412a0e582b143 (patch) | |
tree | 6fc9475b974fa58d9872342fddc4fd9cb8eee14c /org.eclipse.mylyn.bugzilla.core | |
parent | fc7f9b7b9b896faf15b35bd36d24c7eb0933a1b9 (diff) | |
download | org.eclipse.mylyn.tasks-9baf3b6ab656241205751a4522e412a0e582b143.tar.gz org.eclipse.mylyn.tasks-9baf3b6ab656241205751a4522e412a0e582b143.tar.xz org.eclipse.mylyn.tasks-9baf3b6ab656241205751a4522e412a0e582b143.zip |
ASSIGNED - bug 299555: Bugzilla connector should not invoke getResponseBody()
https://bugs.eclipse.org/bugs/show_bug.cgi?id=299555
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.core')
3 files changed, 6 insertions, 17 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java index 3bc6b5de4..945c66643 100644 --- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java +++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java @@ -67,17 +67,17 @@ import org.eclipse.mylyn.commons.net.AbstractWebLocation; import org.eclipse.mylyn.commons.net.AuthenticationCredentials; import org.eclipse.mylyn.commons.net.AuthenticationType; import org.eclipse.mylyn.commons.net.HtmlStreamTokenizer; -import org.eclipse.mylyn.commons.net.HtmlStreamTokenizer.Token; import org.eclipse.mylyn.commons.net.HtmlTag; import org.eclipse.mylyn.commons.net.Policy; import org.eclipse.mylyn.commons.net.WebUtil; +import org.eclipse.mylyn.commons.net.HtmlStreamTokenizer.Token; import org.eclipse.mylyn.internal.bugzilla.core.history.BugzillaTaskHistoryParser; import org.eclipse.mylyn.internal.bugzilla.core.history.TaskHistory; import org.eclipse.mylyn.tasks.core.IRepositoryQuery; import org.eclipse.mylyn.tasks.core.RepositoryResponse; -import org.eclipse.mylyn.tasks.core.RepositoryResponse.ResponseKind; import org.eclipse.mylyn.tasks.core.RepositoryStatus; import org.eclipse.mylyn.tasks.core.TaskRepository; +import org.eclipse.mylyn.tasks.core.RepositoryResponse.ResponseKind; import org.eclipse.mylyn.tasks.core.data.AbstractTaskAttachmentSource; import org.eclipse.mylyn.tasks.core.data.TaskAttachmentMapper; import org.eclipse.mylyn.tasks.core.data.TaskAttachmentPartSource; @@ -1818,11 +1818,6 @@ public class BugzillaClient { } if (!parseable) { - if (method.getResponseHeader("Content-Type") != null) { //$NON-NLS-1$ - Header responseTypeHeader = method.getResponseHeader("Content-Type"); //$NON-NLS-1$ - System.err.println(">>>>> Name:" + responseTypeHeader.getName() + " Value:" - + responseTypeHeader.getValue()); - } parseHtmlError(getResponseStream(method, monitor)); break; } diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipGetMethod.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipGetMethod.java index 2569586c7..bf6dfbcc8 100644 --- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipGetMethod.java +++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipGetMethod.java @@ -12,7 +12,6 @@ package org.eclipse.mylyn.internal.bugzilla.core; import java.io.IOException; -import java.io.InputStream; import org.apache.commons.httpclient.HttpConnection; import org.apache.commons.httpclient.HttpException; @@ -30,6 +29,7 @@ import org.apache.commons.httpclient.methods.GetMethod; * </ul> * * @see GzipPostMethod, GetMethod + * * @author Maarten Meijer */ public class GzipGetMethod extends GetMethod { @@ -64,10 +64,7 @@ public class GzipGetMethod extends GetMethod { */ public void getResponseBodyNoop() throws IOException { // result is ignored - InputStream instream = getResponseBodyAsStream(); - byte[] buffer = new byte[4096]; - while (instream.read(buffer) > 0) { - } + super.getResponseBody(); } } diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipPostMethod.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipPostMethod.java index f3faf3b8a..d85e002e1 100644 --- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipPostMethod.java +++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipPostMethod.java @@ -12,7 +12,6 @@ package org.eclipse.mylyn.internal.bugzilla.core; import java.io.IOException; -import java.io.InputStream; import org.apache.commons.httpclient.HttpConnection; import org.apache.commons.httpclient.HttpException; @@ -30,6 +29,7 @@ import org.apache.commons.httpclient.methods.PostMethod; * </ul> * * @see GzipGetMethod, PostMethod + * * @author Maarten Meijer */ public class GzipPostMethod extends PostMethod { @@ -64,9 +64,6 @@ public class GzipPostMethod extends PostMethod { */ public void getResponseBodyNoop() throws IOException { // result is ignored - InputStream instream = getResponseBodyAsStream(); - byte[] buffer = new byte[4096]; - while (instream.read(buffer) > 0) { - } + super.getResponseBody(); } } |