Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/9fecbc655474bef3001c1c424c2e7c8c92c6010e
...commit
http://git.netsurf-browser.org/netsurf.git/commit/9fecbc655474bef3001c1c424c2e7c8c92c6010e
...tree
http://git.netsurf-browser.org/netsurf.git/tree/9fecbc655474bef3001c1c424c2e7c8c92c6010e
The branch, master has been updated
via 9fecbc655474bef3001c1c424c2e7c8c92c6010e (commit)
via fa546661ad7365507f8dde5d75fb27fae63f27a2 (commit)
via add6dcc0158526bde3cb0785083c0761153fad57 (commit)
via bc280f0e3fb4fbbea868fb4b17f1ea71ecd90ead (commit)
from ca0514ea9218d3b419071056d954bbff9f18a1ac (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=9fecbc655474bef3001c1c424c2e7c8c92c6010e
commit 9fecbc655474bef3001c1c424c2e7c8c92c6010e
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Content: Log URLs with nsurl_access_log().
This reduces the log file size for startup and a single visit
to https://www.bbc.co.uk/news from 266133 to 178777 bytes,
by not dumping big data URLs over and over into the log.
diff --git a/content/content.c b/content/content.c
index 9a24041..a04051b 100644
--- a/content/content.c
+++ b/content/content.c
@@ -74,7 +74,7 @@ nserror content__init(struct content *c, const
content_handler *handler,
nserror error;
NSLOG(netsurf, INFO, "url "URL_FMT_SPC" -> %p",
- nsurl_access(llcache_handle_get_url(llcache)), c);
+ nsurl_access_log(llcache_handle_get_url(llcache)), c);
user_sentinel = calloc(1, sizeof(struct content_user));
if (user_sentinel == NULL) {
@@ -274,7 +274,7 @@ void content_convert(struct content *c)
return;
NSLOG(netsurf, INFO, "content "URL_FMT_SPC" (%p)",
- nsurl_access(llcache_handle_get_url(c->llcache)), c);
+ nsurl_access_log(llcache_handle_get_url(c->llcache)), c);
if (c->handler->data_complete != NULL) {
c->locked = true;
@@ -379,7 +379,7 @@ void content_destroy(struct content *c)
assert(c);
NSLOG(netsurf, INFO, "content %p %s", c,
- nsurl_access(llcache_handle_get_url(c->llcache)));
+ nsurl_access_log(llcache_handle_get_url(c->llcache)));
assert(c->locked == false);
if (c->handler->destroy != NULL)
@@ -658,8 +658,8 @@ bool content_add_user(
struct content_user *user;
NSLOG(netsurf, INFO, "content "URL_FMT_SPC" (%p), user %p %p",
- nsurl_access(llcache_handle_get_url(c->llcache)), c, callback,
- pw);
+ nsurl_access_log(llcache_handle_get_url(c->llcache)),
+ c, callback, pw);
user = malloc(sizeof(struct content_user));
if (!user)
return false;
@@ -693,8 +693,8 @@ void content_remove_user(
{
struct content_user *user, *next;
NSLOG(netsurf, INFO, "content "URL_FMT_SPC" (%p), user %p %p",
- nsurl_access(llcache_handle_get_url(c->llcache)), c, callback,
- pw);
+ nsurl_access_log(llcache_handle_get_url(c->llcache)),
+ c, callback, pw);
/* user_list starts with a sentinel */
for (user = c->user_list; user->next != 0 &&
@@ -816,7 +816,7 @@ void content_open(hlcache_handle *h, struct browser_window
*bw,
struct content *c = hlcache_handle_get_content(h);
assert(c != 0);
NSLOG(netsurf, INFO, "content %p %s", c,
- nsurl_access(llcache_handle_get_url(c->llcache)));
+ nsurl_access_log(llcache_handle_get_url(c->llcache)));
if (c->handler->open != NULL)
c->handler->open(c, bw, page, params);
}
@@ -833,7 +833,7 @@ void content_close(hlcache_handle *h)
struct content *c = hlcache_handle_get_content(h);
assert(c != 0);
NSLOG(netsurf, INFO, "content %p %s", c,
- nsurl_access(llcache_handle_get_url(c->llcache)));
+ nsurl_access_log(llcache_handle_get_url(c->llcache)));
if (c->handler->close != NULL)
c->handler->close(c);
}
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=fa546661ad7365507f8dde5d75fb27fae63f27a2
commit fa546661ad7365507f8dde5d75fb27fae63f27a2
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
nsurl: Move debug logging over to nslog.
diff --git a/utils/nsurl/nsurl.c b/utils/nsurl/nsurl.c
index f197d6d..4dbbe96 100644
--- a/utils/nsurl/nsurl.c
+++ b/utils/nsurl/nsurl.c
@@ -88,10 +88,6 @@ void nsurl_unref(nsurl *url)
if (--url->count > 0)
return;
-#ifdef NSURL_DEBUG
- nsurl__dump(url);
-#endif
-
/* Release lwc strings */
nsurl__components_destroy(&url->components);
diff --git a/utils/nsurl/parse.c b/utils/nsurl/parse.c
index ff5f27b..7ce1e45 100644
--- a/utils/nsurl/parse.c
+++ b/utils/nsurl/parse.c
@@ -460,21 +460,19 @@ static void nsurl__get_string_markers(const char * const
url_s,
marker.fragment = marker.end;
}
-#ifdef NSURL_DEBUG
- NSLOG(netsurf, INFO, "marker.start: %i", marker.start);
- NSLOG(netsurf, INFO, "marker.scheme_end: %i", marker.scheme_end);
- NSLOG(netsurf, INFO, "marker.authority: %i", marker.authority);
+ NSLOG(netsurf, DEEPDEBUG, "marker.start: %zu", marker.start);
+ NSLOG(netsurf, DEEPDEBUG, "marker.scheme_end: %zu", marker.scheme_end);
+ NSLOG(netsurf, DEEPDEBUG, "marker.authority: %zu", marker.authority);
- NSLOG(netsurf, INFO, "marker.colon_first: %i", marker.colon_first);
- NSLOG(netsurf, INFO, "marker.at: %i", marker.at);
- NSLOG(netsurf, INFO, "marker.colon_last: %i", marker.colon_last);
+ NSLOG(netsurf, DEEPDEBUG, "marker.colon_first: %zu",
marker.colon_first);
+ NSLOG(netsurf, DEEPDEBUG, "marker.at: %zu", marker.at);
+ NSLOG(netsurf, DEEPDEBUG, "marker.colon_last: %zu", marker.colon_last);
- NSLOG(netsurf, INFO, "marker.path: %i", marker.path);
- NSLOG(netsurf, INFO, "marker.query: %i", marker.query);
- NSLOG(netsurf, INFO, "marker.fragment: %i", marker.fragment);
+ NSLOG(netsurf, DEEPDEBUG, "marker.path: %zu", marker.path);
+ NSLOG(netsurf, DEEPDEBUG, "marker.query: %zu", marker.query);
+ NSLOG(netsurf, DEEPDEBUG, "marker.fragment: %zu", marker.fragment);
- NSLOG(netsurf, INFO, "marker.end: %i", marker.end);
-#endif
+ NSLOG(netsurf, DEEPDEBUG, "marker.end: %zu", marker.end);
/* Got all the URL components pegged out now */
*markers = marker;
@@ -494,10 +492,10 @@ static size_t nsurl__remove_dot_segments(char *path, char
*output)
char *output_pos = output;
while (*path_pos != '\0') {
-#ifdef NSURL_DEBUG
- NSLOG(netsurf, INFO, " in:%s", path_pos);
- NSLOG(netsurf, INFO, "out:%.*s", output_pos - output, output);
-#endif
+ NSLOG(netsurf, DEEPDEBUG, " in:%s", path_pos);
+ NSLOG(netsurf, DEEPDEBUG, "out:%.*s",
+ (int)(output_pos - output), output);
+
if (*path_pos == '.') {
if (*(path_pos + 1) == '.' &&
*(path_pos + 2) == '/') {
@@ -1333,10 +1331,8 @@ nserror nsurl_join(const nsurl *base, const char *rel,
nsurl **joined)
assert(base != NULL);
assert(rel != NULL);
-#ifdef NSURL_DEBUG
- NSLOG(netsurf, INFO, "base: \"%s\", rel: \"%s\"", nsurl_access(base),
- rel);
-#endif
+ NSLOG(netsurf, DEEPDEBUG, "base: \"%s\", rel: \"%s\"",
+ nsurl_access(base), rel);
/* Peg out the URL sections */
nsurl__get_string_markers(rel, &m, true);
diff --git a/utils/nsurl/private.h b/utils/nsurl/private.h
index 8032be0..4366ff6 100644
--- a/utils/nsurl/private.h
+++ b/utils/nsurl/private.h
@@ -25,10 +25,6 @@
#include "utils/utils.h"
-/* Define to enable NSURL debugging */
-#undef NSURL_DEBUG
-
-
/** A type for URL schemes */
enum nsurl_scheme_type {
NSURL_SCHEME_OTHER,
@@ -188,44 +184,36 @@ static inline void nsurl__components_destroy(struct
nsurl_components *c)
static inline void nsurl__dump(const nsurl *url)
{
if (url->components.scheme)
- NSLOG(netsurf, INFO,netsurf, INFO,
- " Scheme: %s",
- lwc_string_data(url->components.scheme));
+ NSLOG(netsurf, DEEPDEBUG, " Scheme: %s",
+ lwc_string_data(url->components.scheme));
if (url->components.username)
- NSLOG(netsurf, INFO,
- "Username: %s",
- lwc_string_data(url->components.username));
+ NSLOG(netsurf, DEEPDEBUG, "Username: %s",
+ lwc_string_data(url->components.username));
if (url->components.password)
- NSLOG(netsurf, INFO,
- "Password: %s",
- lwc_string_data(url->components.password));
+ NSLOG(netsurf, DEEPDEBUG, "Password: %s",
+ lwc_string_data(url->components.password));
if (url->components.host)
- NSLOG(netsurf, INFO,
- " Host: %s",
- lwc_string_data(url->components.host));
+ NSLOG(netsurf, DEEPDEBUG, " Host: %s",
+ lwc_string_data(url->components.host));
if (url->components.port)
- NSLOG(netsurf, INFO,
- " Port: %s",
- lwc_string_data(url->components.port));
+ NSLOG(netsurf, DEEPDEBUG, " Port: %s",
+ lwc_string_data(url->components.port));
if (url->components.path)
- NSLOG(netsurf, INFO,
- " Path: %s",
- lwc_string_data(url->components.path));
+ NSLOG(netsurf, DEEPDEBUG, " Path: %s",
+ lwc_string_data(url->components.path));
if (url->components.query)
- NSLOG(netsurf, INFO,
- " Query: %s",
- lwc_string_data(url->components.query));
+ NSLOG(netsurf, DEEPDEBUG, " Query: %s",
+ lwc_string_data(url->components.query));
if (url->components.fragment)
- NSLOG(netsurf, INFO,
- "Fragment: %s",
- lwc_string_data(url->components.fragment));
+ NSLOG(netsurf, DEEPDEBUG, "Fragment: %s",
+ lwc_string_data(url->components.fragment));
}
#endif
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=add6dcc0158526bde3cb0785083c0761153fad57
commit add6dcc0158526bde3cb0785083c0761153fad57
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
nsurl: Add variant of nsurl_access for logging.
diff --git a/utils/nsurl.h b/utils/nsurl.h
index 054baf2..bc6e910 100644
--- a/utils/nsurl.h
+++ b/utils/nsurl.h
@@ -181,6 +181,24 @@ const char *nsurl_access(const nsurl *url);
/**
+ * Variant of \ref nsurl_access for logging.
+ *
+ * \param url NetSurf URL to retrieve a string pointer for.
+ * \return the required string
+ *
+ * This will not necessarily return the actual nsurl's URL, but something
+ * that is suitable for recording to logs. E.g. URLs with the `data` scheme
+ * will return a simple place holder, to avoid repeatedly dumping loads of
data.
+ *
+ * The returned string is owned by the NetSurf URL object. It will die
+ * with the NetSurf URL object. Keep a reference to the URL if you need it.
+ *
+ * The returned string has a trailing '\0'.
+ */
+const char *nsurl_access_log(const nsurl *url);
+
+
+/**
* Get a UTF-8 string (for human readable IDNs) from a NetSurf URL object
*
* \param url NetSurf URL object
diff --git a/utils/nsurl/nsurl.c b/utils/nsurl/nsurl.c
index 8c769cf..f197d6d 100644
--- a/utils/nsurl/nsurl.c
+++ b/utils/nsurl/nsurl.c
@@ -316,6 +316,19 @@ const char *nsurl_access(const nsurl *url)
/* exported interface, documented in nsurl.h */
+const char *nsurl_access_log(const nsurl *url)
+{
+ assert(url != NULL);
+
+ if (url->components.scheme_type == NSURL_SCHEME_DATA) {
+ return "[data url]";
+ }
+
+ return url->string;
+}
+
+
+/* exported interface, documented in nsurl.h */
nserror nsurl_get_utf8(const nsurl *url, char **url_s, size_t *url_l)
{
nserror err;
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=bc280f0e3fb4fbbea868fb4b17f1ea71ecd90ead
commit bc280f0e3fb4fbbea868fb4b17f1ea71ecd90ead
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
nsurl: Add data to scheme type enum.
diff --git a/utils/nsurl/parse.c b/utils/nsurl/parse.c
index ce6f443..ff5f27b 100644
--- a/utils/nsurl/parse.c
+++ b/utils/nsurl/parse.c
@@ -302,6 +302,16 @@ static void nsurl__get_string_markers(const char * const
url_s,
((*(pos - off + 5) == 'o') ||
(*(pos - off + 5) == 'O')))) {
marker.scheme_type = NSURL_SCHEME_MAILTO;
+ } else if (off == SLEN("data") &&
+ (((*(pos - off + 0) == 'd') ||
+ (*(pos - off + 0) == 'D')) &&
+ ((*(pos - off + 1) == 'a') ||
+ (*(pos - off + 1) == 'A')) &&
+ ((*(pos - off + 2) == 't') ||
+ (*(pos - off + 2) == 'T')) &&
+ ((*(pos - off + 3) == 'a') ||
+ (*(pos - off + 3) == 'A')))) {
+ marker.scheme_type = NSURL_SCHEME_DATA;
}
/* Skip over colon */
diff --git a/utils/nsurl/private.h b/utils/nsurl/private.h
index bc6737c..8032be0 100644
--- a/utils/nsurl/private.h
+++ b/utils/nsurl/private.h
@@ -36,7 +36,8 @@ enum nsurl_scheme_type {
NSURL_SCHEME_HTTPS,
NSURL_SCHEME_FILE,
NSURL_SCHEME_FTP,
- NSURL_SCHEME_MAILTO
+ NSURL_SCHEME_MAILTO,
+ NSURL_SCHEME_DATA
};
-----------------------------------------------------------------------
Summary of changes:
content/content.c | 18 +++++++++---------
utils/nsurl.h | 18 ++++++++++++++++++
utils/nsurl/nsurl.c | 17 +++++++++++++----
utils/nsurl/parse.c | 46 ++++++++++++++++++++++++++--------------------
utils/nsurl/private.h | 47 ++++++++++++++++++-----------------------------
5 files changed, 84 insertions(+), 62 deletions(-)
diff --git a/content/content.c b/content/content.c
index 9a24041..a04051b 100644
--- a/content/content.c
+++ b/content/content.c
@@ -74,7 +74,7 @@ nserror content__init(struct content *c, const
content_handler *handler,
nserror error;
NSLOG(netsurf, INFO, "url "URL_FMT_SPC" -> %p",
- nsurl_access(llcache_handle_get_url(llcache)), c);
+ nsurl_access_log(llcache_handle_get_url(llcache)), c);
user_sentinel = calloc(1, sizeof(struct content_user));
if (user_sentinel == NULL) {
@@ -274,7 +274,7 @@ void content_convert(struct content *c)
return;
NSLOG(netsurf, INFO, "content "URL_FMT_SPC" (%p)",
- nsurl_access(llcache_handle_get_url(c->llcache)), c);
+ nsurl_access_log(llcache_handle_get_url(c->llcache)), c);
if (c->handler->data_complete != NULL) {
c->locked = true;
@@ -379,7 +379,7 @@ void content_destroy(struct content *c)
assert(c);
NSLOG(netsurf, INFO, "content %p %s", c,
- nsurl_access(llcache_handle_get_url(c->llcache)));
+ nsurl_access_log(llcache_handle_get_url(c->llcache)));
assert(c->locked == false);
if (c->handler->destroy != NULL)
@@ -658,8 +658,8 @@ bool content_add_user(
struct content_user *user;
NSLOG(netsurf, INFO, "content "URL_FMT_SPC" (%p), user %p %p",
- nsurl_access(llcache_handle_get_url(c->llcache)), c, callback,
- pw);
+ nsurl_access_log(llcache_handle_get_url(c->llcache)),
+ c, callback, pw);
user = malloc(sizeof(struct content_user));
if (!user)
return false;
@@ -693,8 +693,8 @@ void content_remove_user(
{
struct content_user *user, *next;
NSLOG(netsurf, INFO, "content "URL_FMT_SPC" (%p), user %p %p",
- nsurl_access(llcache_handle_get_url(c->llcache)), c, callback,
- pw);
+ nsurl_access_log(llcache_handle_get_url(c->llcache)),
+ c, callback, pw);
/* user_list starts with a sentinel */
for (user = c->user_list; user->next != 0 &&
@@ -816,7 +816,7 @@ void content_open(hlcache_handle *h, struct browser_window
*bw,
struct content *c = hlcache_handle_get_content(h);
assert(c != 0);
NSLOG(netsurf, INFO, "content %p %s", c,
- nsurl_access(llcache_handle_get_url(c->llcache)));
+ nsurl_access_log(llcache_handle_get_url(c->llcache)));
if (c->handler->open != NULL)
c->handler->open(c, bw, page, params);
}
@@ -833,7 +833,7 @@ void content_close(hlcache_handle *h)
struct content *c = hlcache_handle_get_content(h);
assert(c != 0);
NSLOG(netsurf, INFO, "content %p %s", c,
- nsurl_access(llcache_handle_get_url(c->llcache)));
+ nsurl_access_log(llcache_handle_get_url(c->llcache)));
if (c->handler->close != NULL)
c->handler->close(c);
}
diff --git a/utils/nsurl.h b/utils/nsurl.h
index 054baf2..bc6e910 100644
--- a/utils/nsurl.h
+++ b/utils/nsurl.h
@@ -181,6 +181,24 @@ const char *nsurl_access(const nsurl *url);
/**
+ * Variant of \ref nsurl_access for logging.
+ *
+ * \param url NetSurf URL to retrieve a string pointer for.
+ * \return the required string
+ *
+ * This will not necessarily return the actual nsurl's URL, but something
+ * that is suitable for recording to logs. E.g. URLs with the `data` scheme
+ * will return a simple place holder, to avoid repeatedly dumping loads of
data.
+ *
+ * The returned string is owned by the NetSurf URL object. It will die
+ * with the NetSurf URL object. Keep a reference to the URL if you need it.
+ *
+ * The returned string has a trailing '\0'.
+ */
+const char *nsurl_access_log(const nsurl *url);
+
+
+/**
* Get a UTF-8 string (for human readable IDNs) from a NetSurf URL object
*
* \param url NetSurf URL object
diff --git a/utils/nsurl/nsurl.c b/utils/nsurl/nsurl.c
index 8c769cf..4dbbe96 100644
--- a/utils/nsurl/nsurl.c
+++ b/utils/nsurl/nsurl.c
@@ -88,10 +88,6 @@ void nsurl_unref(nsurl *url)
if (--url->count > 0)
return;
-#ifdef NSURL_DEBUG
- nsurl__dump(url);
-#endif
-
/* Release lwc strings */
nsurl__components_destroy(&url->components);
@@ -316,6 +312,19 @@ const char *nsurl_access(const nsurl *url)
/* exported interface, documented in nsurl.h */
+const char *nsurl_access_log(const nsurl *url)
+{
+ assert(url != NULL);
+
+ if (url->components.scheme_type == NSURL_SCHEME_DATA) {
+ return "[data url]";
+ }
+
+ return url->string;
+}
+
+
+/* exported interface, documented in nsurl.h */
nserror nsurl_get_utf8(const nsurl *url, char **url_s, size_t *url_l)
{
nserror err;
diff --git a/utils/nsurl/parse.c b/utils/nsurl/parse.c
index ce6f443..7ce1e45 100644
--- a/utils/nsurl/parse.c
+++ b/utils/nsurl/parse.c
@@ -302,6 +302,16 @@ static void nsurl__get_string_markers(const char * const
url_s,
((*(pos - off + 5) == 'o') ||
(*(pos - off + 5) == 'O')))) {
marker.scheme_type = NSURL_SCHEME_MAILTO;
+ } else if (off == SLEN("data") &&
+ (((*(pos - off + 0) == 'd') ||
+ (*(pos - off + 0) == 'D')) &&
+ ((*(pos - off + 1) == 'a') ||
+ (*(pos - off + 1) == 'A')) &&
+ ((*(pos - off + 2) == 't') ||
+ (*(pos - off + 2) == 'T')) &&
+ ((*(pos - off + 3) == 'a') ||
+ (*(pos - off + 3) == 'A')))) {
+ marker.scheme_type = NSURL_SCHEME_DATA;
}
/* Skip over colon */
@@ -450,21 +460,19 @@ static void nsurl__get_string_markers(const char * const
url_s,
marker.fragment = marker.end;
}
-#ifdef NSURL_DEBUG
- NSLOG(netsurf, INFO, "marker.start: %i", marker.start);
- NSLOG(netsurf, INFO, "marker.scheme_end: %i", marker.scheme_end);
- NSLOG(netsurf, INFO, "marker.authority: %i", marker.authority);
+ NSLOG(netsurf, DEEPDEBUG, "marker.start: %zu", marker.start);
+ NSLOG(netsurf, DEEPDEBUG, "marker.scheme_end: %zu", marker.scheme_end);
+ NSLOG(netsurf, DEEPDEBUG, "marker.authority: %zu", marker.authority);
- NSLOG(netsurf, INFO, "marker.colon_first: %i", marker.colon_first);
- NSLOG(netsurf, INFO, "marker.at: %i", marker.at);
- NSLOG(netsurf, INFO, "marker.colon_last: %i", marker.colon_last);
+ NSLOG(netsurf, DEEPDEBUG, "marker.colon_first: %zu",
marker.colon_first);
+ NSLOG(netsurf, DEEPDEBUG, "marker.at: %zu", marker.at);
+ NSLOG(netsurf, DEEPDEBUG, "marker.colon_last: %zu", marker.colon_last);
- NSLOG(netsurf, INFO, "marker.path: %i", marker.path);
- NSLOG(netsurf, INFO, "marker.query: %i", marker.query);
- NSLOG(netsurf, INFO, "marker.fragment: %i", marker.fragment);
+ NSLOG(netsurf, DEEPDEBUG, "marker.path: %zu", marker.path);
+ NSLOG(netsurf, DEEPDEBUG, "marker.query: %zu", marker.query);
+ NSLOG(netsurf, DEEPDEBUG, "marker.fragment: %zu", marker.fragment);
- NSLOG(netsurf, INFO, "marker.end: %i", marker.end);
-#endif
+ NSLOG(netsurf, DEEPDEBUG, "marker.end: %zu", marker.end);
/* Got all the URL components pegged out now */
*markers = marker;
@@ -484,10 +492,10 @@ static size_t nsurl__remove_dot_segments(char *path, char
*output)
char *output_pos = output;
while (*path_pos != '\0') {
-#ifdef NSURL_DEBUG
- NSLOG(netsurf, INFO, " in:%s", path_pos);
- NSLOG(netsurf, INFO, "out:%.*s", output_pos - output, output);
-#endif
+ NSLOG(netsurf, DEEPDEBUG, " in:%s", path_pos);
+ NSLOG(netsurf, DEEPDEBUG, "out:%.*s",
+ (int)(output_pos - output), output);
+
if (*path_pos == '.') {
if (*(path_pos + 1) == '.' &&
*(path_pos + 2) == '/') {
@@ -1323,10 +1331,8 @@ nserror nsurl_join(const nsurl *base, const char *rel,
nsurl **joined)
assert(base != NULL);
assert(rel != NULL);
-#ifdef NSURL_DEBUG
- NSLOG(netsurf, INFO, "base: \"%s\", rel: \"%s\"", nsurl_access(base),
- rel);
-#endif
+ NSLOG(netsurf, DEEPDEBUG, "base: \"%s\", rel: \"%s\"",
+ nsurl_access(base), rel);
/* Peg out the URL sections */
nsurl__get_string_markers(rel, &m, true);
diff --git a/utils/nsurl/private.h b/utils/nsurl/private.h
index bc6737c..4366ff6 100644
--- a/utils/nsurl/private.h
+++ b/utils/nsurl/private.h
@@ -25,10 +25,6 @@
#include "utils/utils.h"
-/* Define to enable NSURL debugging */
-#undef NSURL_DEBUG
-
-
/** A type for URL schemes */
enum nsurl_scheme_type {
NSURL_SCHEME_OTHER,
@@ -36,7 +32,8 @@ enum nsurl_scheme_type {
NSURL_SCHEME_HTTPS,
NSURL_SCHEME_FILE,
NSURL_SCHEME_FTP,
- NSURL_SCHEME_MAILTO
+ NSURL_SCHEME_MAILTO,
+ NSURL_SCHEME_DATA
};
@@ -187,44 +184,36 @@ static inline void nsurl__components_destroy(struct
nsurl_components *c)
static inline void nsurl__dump(const nsurl *url)
{
if (url->components.scheme)
- NSLOG(netsurf, INFO,netsurf, INFO,
- " Scheme: %s",
- lwc_string_data(url->components.scheme));
+ NSLOG(netsurf, DEEPDEBUG, " Scheme: %s",
+ lwc_string_data(url->components.scheme));
if (url->components.username)
- NSLOG(netsurf, INFO,
- "Username: %s",
- lwc_string_data(url->components.username));
+ NSLOG(netsurf, DEEPDEBUG, "Username: %s",
+ lwc_string_data(url->components.username));
if (url->components.password)
- NSLOG(netsurf, INFO,
- "Password: %s",
- lwc_string_data(url->components.password));
+ NSLOG(netsurf, DEEPDEBUG, "Password: %s",
+ lwc_string_data(url->components.password));
if (url->components.host)
- NSLOG(netsurf, INFO,
- " Host: %s",
- lwc_string_data(url->components.host));
+ NSLOG(netsurf, DEEPDEBUG, " Host: %s",
+ lwc_string_data(url->components.host));
if (url->components.port)
- NSLOG(netsurf, INFO,
- " Port: %s",
- lwc_string_data(url->components.port));
+ NSLOG(netsurf, DEEPDEBUG, " Port: %s",
+ lwc_string_data(url->components.port));
if (url->components.path)
- NSLOG(netsurf, INFO,
- " Path: %s",
- lwc_string_data(url->components.path));
+ NSLOG(netsurf, DEEPDEBUG, " Path: %s",
+ lwc_string_data(url->components.path));
if (url->components.query)
- NSLOG(netsurf, INFO,
- " Query: %s",
- lwc_string_data(url->components.query));
+ NSLOG(netsurf, DEEPDEBUG, " Query: %s",
+ lwc_string_data(url->components.query));
if (url->components.fragment)
- NSLOG(netsurf, INFO,
- "Fragment: %s",
- lwc_string_data(url->components.fragment));
+ NSLOG(netsurf, DEEPDEBUG, "Fragment: %s",
+ lwc_string_data(url->components.fragment));
}
#endif
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org