From de6f1a2b2ed22d706d5b55de8b2f95601b5e7ba0 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 12 Apr 2010 09:25:41 +0000 Subject: Make new cache strip the fragment identifier, like fetchcache did. svn path=/trunk/netsurf/; revision=10381 --- content/hlcache.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'content/hlcache.c') 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); -- cgit v1.2.3