summaryrefslogtreecommitdiff
path: root/content/urldb.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-05-28 13:19:07 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-05-28 13:19:07 +0000
commitc1e3fb0bec198e0f58f612a947e21360a28ffee7 (patch)
treef780a5690ae7e7be789778791a28f69e5cc2e0b6 /content/urldb.c
parent5d75e40700203e748b6f27cd087150d99c5cb261 (diff)
downloadnetsurf-c1e3fb0bec198e0f58f612a947e21360a28ffee7.tar.gz
netsurf-c1e3fb0bec198e0f58f612a947e21360a28ffee7.tar.bz2
Remove spurious "domain" variable from urldb_iterate_partial().
Lose unnecessary increment of rptr in cookie domain prefix matching. Record that, in the long term, we need some kind of TLD service to consult so that (e.g.) .co.uk is not considered a valid domain prefix. svn path=/trunk/netsurf/; revision=7600
Diffstat (limited to 'content/urldb.c')
-rw-r--r--content/urldb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/content/urldb.c b/content/urldb.c
index 40f6f1f65..b4869db26 100644
--- a/content/urldb.c
+++ b/content/urldb.c
@@ -1143,8 +1143,6 @@ void urldb_iterate_partial(const char *prefix,
if (slash) {
/* if there's a slash in the input, then we can
* assume that we're looking for a path */
- char *domain = host;
-
snprintf(host, sizeof host, "%.*s",
(int) (slash - prefix), prefix);
@@ -1159,7 +1157,6 @@ void urldb_iterate_partial(const char *prefix,
buf);
if (!h)
return;
- domain = buf;
} else
return;
}
@@ -2734,6 +2731,10 @@ bool urldb_set_cookie(const char *header, const char *url,
* more accurately.
*/
+ /** \todo In future, we should consult a TLD service
+ * instead of just looking for embedded dots.
+ */
+
hptr = host + strlen(host) - 1;
rptr = rhost + strlen(rhost) - 1;
@@ -2748,7 +2749,6 @@ bool urldb_set_cookie(const char *header, const char *url,
* common suffix. The above loop will exit pointing
* to the byte before the start of the suffix. */
hptr++;
- rptr++;
/* 2 */
while (*hptr != '\0' && *hptr != '.')