Make new cache strip the fragment identifier, like fetchcache did.

svn path=/trunk/netsurf/; revision=10381
This commit is contained in:
Michael Drake 2010-04-12 09:25:41 +00:00
parent 6f8a8495c6
commit de6f1a2b2e

View File

@ -107,6 +107,7 @@ nserror hlcache_handle_retrieve(const char *url, uint32_t flags,
{ {
hlcache_retrieval_ctx *ctx; hlcache_retrieval_ctx *ctx;
nserror error; nserror error;
char *hash;
assert(cb != NULL); assert(cb != NULL);
@ -138,6 +139,10 @@ nserror hlcache_handle_retrieve(const char *url, uint32_t flags,
ctx->handle->cb = cb; ctx->handle->cb = cb;
ctx->handle->pw = pw; ctx->handle->pw = pw;
/* strip fragment identifier */
if ((hash = strchr(url, '#')) != NULL)
*hash = 0;
error = llcache_handle_retrieve(url, flags, referer, post, error = llcache_handle_retrieve(url, flags, referer, post,
hlcache_llcache_callback, ctx, hlcache_llcache_callback, ctx,
&ctx->llcache); &ctx->llcache);