-/* makes directory if neccessary */
-int http_download_get_url ( const char *hostname, const char *uri, FILE *f, int already_redirected, int sendhostname )
+int http_download_get_url ( const char *hostname, const char *uri, FILE *f, int already_redirected, DownloadOptions *options )
send ( sock, "GET http://", 11, 0);
send ( sock, hostname, strlen(hostname), 0 );
send ( sock, uri, strlen ( uri ), 0 );
send ( sock, "GET http://", 11, 0);
send ( sock, hostname, strlen(hostname), 0 );
send ( sock, uri, strlen ( uri ), 0 );
- rv = http_download_get_url ( newhost, newuri, f, 1, sendhostname );
+ if ( options != NULL )
+ rv = http_download_get_url ( newhost, newuri, f, 1, options->sendhostname );
+ else
+ rv = http_download_get_url ( newhost, newuri, f, 1, 0 );