mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 12:36:51 +03:00
Add option_suppress_curl_debug and default it to true
svn path=/trunk/netsurf/; revision=3373
This commit is contained in:
parent
82c4458689
commit
e2d0019119
@ -1288,6 +1288,12 @@ fetch_curl_finalise(const char *scheme)
|
||||
}
|
||||
}
|
||||
|
||||
/** Ignore everything given to it.
|
||||
*
|
||||
* Used to ignore cURL debug.
|
||||
*/
|
||||
int fetch_curl_ignore(void) { return 0; }
|
||||
|
||||
/**
|
||||
* Initialise the fetcher.
|
||||
*
|
||||
@ -1331,6 +1337,8 @@ void register_curl_fetchers(void)
|
||||
SETOPT(CURLOPT_VERBOSE, 0);
|
||||
}
|
||||
SETOPT(CURLOPT_ERRORBUFFER, fetch_error_buffer);
|
||||
if (option_suppress_curl_debug)
|
||||
SETOPT(CURLOPT_DEBUGFUNCTION, fetch_curl_ignore);
|
||||
SETOPT(CURLOPT_WRITEFUNCTION, fetch_curl_data);
|
||||
SETOPT(CURLOPT_HEADERFUNCTION, fetch_curl_header);
|
||||
SETOPT(CURLOPT_PROGRESSFUNCTION, fetch_curl_progress);
|
||||
|
@ -128,6 +128,9 @@ int option_max_fetchers_per_host = 2;
|
||||
* is this plus option_max_fetchers.
|
||||
*/
|
||||
int option_max_cached_fetch_handles = 6;
|
||||
/** Suppress debug output from cURL. */
|
||||
bool option_suppress_curl_debug = true;
|
||||
|
||||
/** Whether to allow target="_blank" */
|
||||
bool option_target_blank = true;
|
||||
|
||||
@ -181,6 +184,7 @@ struct {
|
||||
OPTION_INTEGER, &option_max_fetchers_per_host },
|
||||
{ "max_cached_fetch_handles",
|
||||
OPTION_INTEGER, &option_max_cached_fetch_handles },
|
||||
{ "suppress_curl_debug", OPTION_BOOL, &option_suppress_curl_debug },
|
||||
{ "target_blank",
|
||||
OPTION_BOOL, &option_target_blank },
|
||||
EXTRA_OPTION_TABLE
|
||||
|
@ -73,6 +73,7 @@ extern int option_toolbar_status_width;
|
||||
extern int option_max_fetchers;
|
||||
extern int option_max_fetchers_per_host;
|
||||
extern int option_max_cached_fetch_handles;
|
||||
extern bool option_suppress_curl_debug;
|
||||
|
||||
|
||||
void options_read(const char *path);
|
||||
|
Loading…
Reference in New Issue
Block a user