}
static const char* regen_key(apr_pool_t *p, apr_table_t *headers,
- apr_array_header_t *varray, const char *oldkey)
+ apr_array_header_t *varray, const char *oldkey,
+ apr_size_t *newkeylen)
{
struct iovec *iov;
int i, k;
iov[k].iov_len = strlen(oldkey);
k++;
- return apr_pstrcatv(p, iov, k, NULL);
+ return apr_pstrcatv(p, iov, k, newkeylen);
}
static int array_alphasort(const void *fn1, const void *fn2)
return DECLINED;
}
- nkey = regen_key(r->pool, r->headers_in, varray, key);
+ nkey = regen_key(r->pool, r->headers_in, varray, key, &len);
/* attempt to retrieve the cached entry */
if (socache_mutex) {
buffer_len = sobj->buffer_len;
rc = conf->provider->socache_provider->retrieve(
conf->provider->socache_instance, r->server,
- (unsigned char *) nkey, strlen(nkey), sobj->buffer,
+ (unsigned char *) nkey, len, sobj->buffer,
&buffer_len, r->pool);
if (socache_mutex) {
apr_status_t status = apr_global_mutex_unlock(socache_mutex);
}
obj->key = sobj->key = regen_key(r->pool, sobj->headers_in, varray,
- sobj->name);
+ sobj->name, NULL);
}
}