return 1;
}
-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 )
{
static char input_buffer[1024];
int sock;
}
- if ( sendhostname ) {
+ if ( options != NULL && options->sendhostname ) {
send ( sock, "GET http://", 11, 0);
send ( sock, hostname, strlen(hostname), 0 );
send ( sock, uri, strlen ( uri ), 0 );
char *newuri = strdup ( uri_start );
close ( sock );
- 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 );
free ( newhost );
free ( newuri );