summaryrefslogtreecommitdiff
path: root/content/hlcache.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2010-04-12 09:25:41 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2010-04-12 09:25:41 +0000
commitde6f1a2b2ed22d706d5b55de8b2f95601b5e7ba0 (patch)
treefa47341cb1e34af95c767aea8c5593573fbb7d33 /content/hlcache.c
parent6f8a8495c69da09071d060053300a9c241cdcf63 (diff)
downloadnetsurf-de6f1a2b2ed22d706d5b55de8b2f95601b5e7ba0.tar.gz
netsurf-de6f1a2b2ed22d706d5b55de8b2f95601b5e7ba0.tar.bz2
Make new cache strip the fragment identifier, like fetchcache did.
svn path=/trunk/netsurf/; revision=10381
Diffstat (limited to 'content/hlcache.c')
-rw-r--r--content/hlcache.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/content/hlcache.c b/content/hlcache.c
index 84f391aed..d839b500c 100644
--- a/content/hlcache.c
+++ b/content/hlcache.c
@@ -107,6 +107,7 @@ nserror hlcache_handle_retrieve(const char *url, uint32_t flags,
{
hlcache_retrieval_ctx *ctx;
nserror error;
+ char *hash;
assert(cb != NULL);
@@ -138,6 +139,10 @@ nserror hlcache_handle_retrieve(const char *url, uint32_t flags,
ctx->handle->cb = cb;
ctx->handle->pw = pw;
+ /* strip fragment identifier */
+ if ((hash = strchr(url, '#')) != NULL)
+ *hash = 0;
+
error = llcache_handle_retrieve(url, flags, referer, post,
hlcache_llcache_callback, ctx,
&ctx->llcache);