Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 84103 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/update/internal/core/HttpResponse.java (-2 / +5 lines)
Lines 29-35 Link Here
29
29
30
	public InputStream getInputStream() throws IOException {
30
	public InputStream getInputStream() throws IOException {
31
		if (in == null && url != null) {
31
		if (in == null && url != null) {
32
			connection = url.openConnection();
32
			if (connection == null)
33
				connection = url.openConnection();
33
			if (offset > 0)
34
			if (offset > 0)
34
				connection.setRequestProperty("Range", "bytes=" + offset + "-"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
35
				connection.setRequestProperty("Range", "bytes=" + offset + "-"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
35
			in = connection.getInputStream();
36
			in = connection.getInputStream();
Lines 43-49 Link Here
43
	public InputStream getInputStream(IProgressMonitor monitor)
44
	public InputStream getInputStream(IProgressMonitor monitor)
44
		throws IOException, CoreException {
45
		throws IOException, CoreException {
45
		if (in == null && url != null) {
46
		if (in == null && url != null) {
46
			connection = url.openConnection();
47
			if (connection == null)
48
				connection = url.openConnection();
47
			if (offset > 0)
49
			if (offset > 0)
48
				connection.setRequestProperty("Range", "bytes=" + offset + "-"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
50
				connection.setRequestProperty("Range", "bytes=" + offset + "-"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
49
51
Lines 125-130 Link Here
125
			for (;;) {
127
			for (;;) {
126
				if (monitor.isCanceled()) {
128
				if (monitor.isCanceled()) {
127
					runnable.disconnect();
129
					runnable.disconnect();
130
                    connection = null;
128
					break;
131
					break;
129
				}
132
				}
130
				if (runnable.getInputStream() != null) {
133
				if (runnable.getInputStream() != null) {
(-)src/org/eclipse/update/internal/core/OtherResponse.java (-2 / +5 lines)
Lines 29-35 Link Here
29
29
30
	public InputStream getInputStream() throws IOException {
30
	public InputStream getInputStream() throws IOException {
31
		if (in == null && url != null) {
31
		if (in == null && url != null) {
32
			connection = url.openConnection();
32
            if (connection == null)
33
                connection = url.openConnection();
33
			in = connection.getInputStream();
34
			in = connection.getInputStream();
34
			this.lastModified = connection.getLastModified();
35
			this.lastModified = connection.getLastModified();
35
		}
36
		}
Lines 41-47 Link Here
41
	public InputStream getInputStream(IProgressMonitor monitor)
42
	public InputStream getInputStream(IProgressMonitor monitor)
42
		throws IOException, CoreException {
43
		throws IOException, CoreException {
43
		if (in == null && url != null) {
44
		if (in == null && url != null) {
44
			connection = url.openConnection();
45
            if (connection == null)
46
                connection = url.openConnection();
45
47
46
			if (monitor != null) {
48
			if (monitor != null) {
47
				this.in =
49
				this.in =
Lines 92-97 Link Here
92
				for (;;) {
94
				for (;;) {
93
					if (monitor.isCanceled()) {
95
					if (monitor.isCanceled()) {
94
						runnable.disconnect();
96
						runnable.disconnect();
97
                        connection = null;
95
						break;
98
						break;
96
					}
99
					}
97
					if (runnable.getInputStream() != null) {
100
					if (runnable.getInputStream() != null) {

Return to bug 84103