View | Details | Raw Unified | Return to bug 3012
Collapse All | Expand All

(-)classes/file/FileWrapper.inc.php (-2 / +3 lines)
 Lines 181-192    Link Here 
181
	}
181
	}
182
182
183
	function open($mode = 'r') {
183
	function open($mode = 'r') {
184
		$host = isset($this->info['host']) ? $this->info['host'] : $this->defaultHost;
184
		$realHost = $host = isset($this->info['host']) ? $this->info['host'] : $this->defaultHost;
185
		$port = isset($this->info['port']) ? (int)$this->info['port'] : $this->defaultPort;
185
		$port = isset($this->info['port']) ? (int)$this->info['port'] : $this->defaultPort;
186
		$path = isset($this->info['path']) ? $this->info['path'] : $this->defaultPath;
186
		$path = isset($this->info['path']) ? $this->info['path'] : $this->defaultPath;
187
		if (isset($this->info['query'])) $path .= '?' . $this->info['query'];
187
		if (isset($this->info['query'])) $path .= '?' . $this->info['query'];
188
188
189
		if (!empty($this->proxyHost)) {
189
		if (!empty($this->proxyHost)) {
190
			$realHost = $host;
190
			$host = $this->proxyHost;
191
			$host = $this->proxyHost;
191
			$port = $this->proxyPort;
192
			$port = $this->proxyPort;
192
			if (!empty($this->proxyUsername)) {
193
			if (!empty($this->proxyUsername)) {
 Lines 203-209    Link Here 
203
		}
204
		}
204
205
205
		$request = 'GET ' . (empty($this->proxyHost)?$path:$this->url) . " HTTP/1.0\r\n" .
206
		$request = 'GET ' . (empty($this->proxyHost)?$path:$this->url) . " HTTP/1.0\r\n" .
206
			"Host: $host\r\n" .
207
			"Host: $realHost\r\n" .
207
			$additionalHeadersString .
208
			$additionalHeadersString .
208
			"Connection: Close\r\n\r\n";
209
			"Connection: Close\r\n\r\n";
209
		fwrite($this->fp, $request);
210
		fwrite($this->fp, $request);

Return to bug 3012