diff --git a/files_proxy.module b/files_proxy.module index 5a43d63..1102cdb 100644 --- a/files_proxy.module +++ b/files_proxy.module @@ -137,10 +137,11 @@ function files_proxy_local($host) { if (empty($ip)) { $ip = empty($_SERVER['SERVER_ADDR']) ? '127.0.0.1' : $_SERVER['SERVER_ADDR']; } - $url = 'http://' . $ip . $base_path . $_GET['q']; + $url = 'http://' . $ip . $base_path . str_replace(' ', '%20', $_GET['q']); $headers = array( 'Host' => $host, 'Connection' => 'close', + 'Referer' => $base_root . request_uri(), ); // Send request to that host on this server.