From b98f105b24879c065a4f89b686c5084f14f87ae6 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 22 Feb 2009 15:13:10 +0000 Subject: [PATCH] Purge WITH_AUTH svn path=/trunk/netsurf/; revision=6600 --- Docs/Doxyfile | 2 +- content/content.h | 2 -- content/fetch.h | 2 -- content/fetchcache.c | 2 -- content/fetchers/fetch_curl.c | 9 +-------- css/css.c | 4 +--- desktop/401login.h | 3 --- desktop/browser.c | 4 ---- render/html.c | 4 ---- riscos/401login.c | 2 -- riscos/dialog.c | 4 ---- riscos/gui.h | 2 -- utils/config.h | 3 --- 13 files changed, 3 insertions(+), 40 deletions(-) diff --git a/Docs/Doxyfile b/Docs/Doxyfile index c22ecfbb0..13b397ff6 100644 --- a/Docs/Doxyfile +++ b/Docs/Doxyfile @@ -894,7 +894,7 @@ INCLUDE_FILE_PATTERNS = # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. -PREDEFINED = riscos CSS_INTERNALS WITH_ARTWORKS WITH_AUTH WITH_BMP WITH_DRAW WITH_DRAW_EXPORT WITH_GIF WITH_JPEG WITH_MMAP WITH_MNG WITH_NSSPRITE WITH_NS_SVG WITH_PLUGIN WITH_PRINT WITH_RSVG WITH_SAVE_COMPLETE WITH_SEARCH WITH_SPRITE WITH_THEME_INSTALL WITH_URI WITH_URL WITH_PDF_EXPORT +PREDEFINED = riscos CSS_INTERNALS WITH_ARTWORKS WITH_BMP WITH_DRAW WITH_DRAW_EXPORT WITH_GIF WITH_JPEG WITH_MMAP WITH_MNG WITH_NSSPRITE WITH_NS_SVG WITH_PLUGIN WITH_PRINT WITH_RSVG WITH_SAVE_COMPLETE WITH_SEARCH WITH_SPRITE WITH_THEME_INSTALL WITH_URI WITH_URL WITH_PDF_EXPORT # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. diff --git a/content/content.h b/content/content.h index 42cca1f74..298e669ca 100644 --- a/content/content.h +++ b/content/content.h @@ -97,9 +97,7 @@ typedef enum { CONTENT_MSG_NEWPTR, /**< structure has been replaced */ CONTENT_MSG_REFRESH, /**< wants refresh */ CONTENT_MSG_LAUNCH, /**< needs url launching in external program */ -#ifdef WITH_AUTH CONTENT_MSG_AUTH, /**< authentication required */ -#endif CONTENT_MSG_SSL /**< SSL cert verify failed */ } content_msg; diff --git a/content/fetch.h b/content/fetch.h index eaae1165b..42b6323c5 100644 --- a/content/fetch.h +++ b/content/fetch.h @@ -36,9 +36,7 @@ typedef enum { FETCH_ERROR, FETCH_REDIRECT, FETCH_NOTMODIFIED, -#ifdef WITH_AUTH FETCH_AUTH, -#endif FETCH_CERT_ERR, } fetch_msg; diff --git a/content/fetchcache.c b/content/fetchcache.c index ddd46b4d4..390c092b6 100644 --- a/content/fetchcache.c +++ b/content/fetchcache.c @@ -501,7 +501,6 @@ void fetchcache_callback(fetch_msg msg, void *p, const void *data, fetchcache_notmodified(c, data); break; -#ifdef WITH_AUTH case FETCH_AUTH: /* data -> string containing the Realm */ LOG(("FETCH_AUTH, '%s'", (const char *)data)); @@ -512,7 +511,6 @@ void fetchcache_callback(fetch_msg msg, void *p, const void *data, * destroyed in content_clean() */ c->status = CONTENT_STATUS_ERROR; break; -#endif case FETCH_CERT_ERR: c->fetch = 0; diff --git a/content/fetchers/fetch_curl.c b/content/fetchers/fetch_curl.c index 0bd1161e6..2ce316aaa 100644 --- a/content/fetchers/fetch_curl.c +++ b/content/fetchers/fetch_curl.c @@ -561,16 +561,13 @@ fetch_curl_set_options(struct curl_fetch_info *f) SETOPT(CURLOPT_COOKIE, NULL); } -#ifdef WITH_AUTH if ((auth = urldb_get_auth_details(f->url)) != NULL) { SETOPT(CURLOPT_HTTPAUTH, CURLAUTH_ANY); SETOPT(CURLOPT_USERPWD, auth); } else { -#endif SETOPT(CURLOPT_USERPWD, NULL); -#ifdef WITH_AUTH } -#endif + if (option_http_proxy && option_http_proxy_host) { SETOPT(CURLOPT_PROXY, option_http_proxy_host); SETOPT(CURLOPT_PROXYPORT, (long) option_http_proxy_port); @@ -1036,7 +1033,6 @@ size_t fetch_curl_header(char *data, size_t size, size_t nmemb, SKIP_ST(15); if (i < (int)size && '0' <= data[i] && data[i] <= '9') f->content_length = atol(data + i); -#ifdef WITH_AUTH } else if (17 < size && strncasecmp(data, "WWW-Authenticate:", 17) == 0) { /* extract the first Realm from WWW-Authenticate header */ free(f->realm); @@ -1065,7 +1061,6 @@ size_t fetch_curl_header(char *data, size_t size, size_t nmemb, f->realm[i] == '\n'); --i) f->realm[i] = '\0'; } -#endif } else if (11 < size && strncasecmp(data, "Set-Cookie:", 11) == 0) { /* extract Set-Cookie header */ SKIP_ST(11); @@ -1118,12 +1113,10 @@ bool fetch_curl_process_headers(struct curl_fetch_info *f) } /* handle HTTP 401 (Authentication errors) */ -#ifdef WITH_AUTH if (http_code == 401) { fetch_send_callback(FETCH_AUTH, f->fetch_handle, f->realm,0); return true; } -#endif /* handle HTTP errors (non 2xx response codes) */ if (f->only_2xx && strncmp(f->url, "http", 4) == 0 && diff --git a/css/css.c b/css/css.c index b303244df..b493764de 100644 --- a/css/css.c +++ b/css/css.c @@ -956,12 +956,10 @@ void css_atimport_callback(content_msg msg, struct content *css, /*css_dump_stylesheet(css->data.css);*/ c->active--; break; -#ifdef WITH_AUTH + case CONTENT_MSG_AUTH: -#endif case CONTENT_MSG_SSL: /* todo: handle AUTH and SSL */ - case CONTENT_MSG_LAUNCH: /* Fall through */ case CONTENT_MSG_ERROR: diff --git a/desktop/401login.h b/desktop/401login.h index 8f7220663..8a45477fd 100644 --- a/desktop/401login.h +++ b/desktop/401login.h @@ -20,7 +20,6 @@ #define NETSURF_DESKTOP_401LOGIN_H #include "utils/config.h" -#ifdef WITH_AUTH #include "content/content.h" #include "desktop/browser.h" @@ -29,5 +28,3 @@ void gui_401login_open(struct browser_window *bw, struct content *c, const char *realm); #endif - -#endif diff --git a/desktop/browser.c b/desktop/browser.c index 19f7c9de4..aedd405d9 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -40,9 +40,7 @@ #include "content/fetchcache.h" #include "content/urldb.h" #include "css/css.h" -#ifdef WITH_AUTH #include "desktop/401login.h" -#endif #include "desktop/browser.h" #include "desktop/frames.h" #include "desktop/history_core.h" @@ -587,7 +585,6 @@ void browser_window_callback(content_msg msg, struct content *c, bw->referer = 0; break; -#ifdef WITH_AUTH case CONTENT_MSG_AUTH: gui_401login_open(bw, c, data.auth_realm); if (c == bw->loading_content) @@ -602,7 +599,6 @@ void browser_window_callback(content_msg msg, struct content *c, free(bw->referer); bw->referer = 0; break; -#endif case CONTENT_MSG_SSL: gui_cert_verify(bw, c, data.ssl.certs, data.ssl.num); diff --git a/render/html.c b/render/html.c index 27b3ffcda..8dc683739 100644 --- a/render/html.c +++ b/render/html.c @@ -1131,13 +1131,11 @@ void html_convert_css_callback(content_msg msg, struct content *css, c->data.html.stylesheet_content[i] = css; break; -#ifdef WITH_AUTH case CONTENT_MSG_AUTH: c->data.html.stylesheet_content[i] = 0; c->active--; content_add_error(c, "?", 0); break; -#endif case CONTENT_MSG_SSL: c->data.html.stylesheet_content[i] = 0; @@ -1410,13 +1408,11 @@ void html_object_callback(content_msg msg, struct content *object, c->data.html.object[i].content = object; break; -#ifdef WITH_AUTH case CONTENT_MSG_AUTH: c->data.html.object[i].content = 0; c->active--; content_add_error(c, "?", 0); break; -#endif case CONTENT_MSG_SSL: c->data.html.object[i].content = 0; diff --git a/riscos/401login.c b/riscos/401login.c index cc75f4ba3..ab27ca6ca 100644 --- a/riscos/401login.c +++ b/riscos/401login.c @@ -17,7 +17,6 @@ */ #include "utils/config.h" -#ifdef WITH_AUTH #include #include @@ -213,4 +212,3 @@ bool ro_gui_401login_apply(wimp_w w) return true; } -#endif diff --git a/riscos/dialog.c b/riscos/dialog.c index ecc03b1e2..26e306645 100644 --- a/riscos/dialog.c +++ b/riscos/dialog.c @@ -64,9 +64,7 @@ wimp_w dialog_info, dialog_saveas, -#ifdef WITH_AUTH dialog_401li, -#endif dialog_zoom, dialog_pageinfo, dialog_objinfo, dialog_tooltip, dialog_warning, dialog_debug, dialog_folder, dialog_entry, dialog_search, dialog_print, @@ -105,9 +103,7 @@ void ro_gui_dialog_init(void) ro_gui_configure_initialise(); /* 401 login window */ -#ifdef WITH_AUTH ro_gui_401login_init(); -#endif /* certificate verification window */ ro_gui_cert_init(); diff --git a/riscos/gui.h b/riscos/gui.h index eb6c812e6..6f0528ee0 100644 --- a/riscos/gui.h +++ b/riscos/gui.h @@ -134,9 +134,7 @@ void ro_gui_download_datasave_ack(wimp_message *message); bool ro_gui_download_prequit(void); /* in 401login.c */ -#ifdef WITH_AUTH void ro_gui_401login_init(void); -#endif /* in sslcert.c */ void ro_gui_cert_init(void); diff --git a/utils/config.h b/utils/config.h index 61aa120c3..12b4236d6 100644 --- a/utils/config.h +++ b/utils/config.h @@ -39,9 +39,6 @@ char *strndup(const char *s, size_t n); * IF ADDING A FEATURE HERE, ADD IT TO Docs/Doxyfile's "PREDEFINED" DEFINITION AS WELL. */ -/* HTTP Auth */ -#define WITH_AUTH - /* Platform specific features */ #if defined(riscos) /* Acorn URI protocol support */