diff --git a/ngx_http_shibboleth_module.c b/ngx_http_shibboleth_module.c
index c2f6d9e00b6ed61c07cfc846277f8c8b48331620..709c37ba6cadff7c15d59b3cc093c3cb61c7e181 100644
--- a/ngx_http_shibboleth_module.c
+++ b/ngx_http_shibboleth_module.c
@@ -190,6 +190,7 @@ ngx_http_auth_request_handler(ngx_http_request_t *r)
                     /* Strip the Variable- prefix */
                     hi->key.len = h[i].key.len - 9;
                     hi->key.data = h[i].key.data + 9;
+                    hi->hash = ngx_hash_key(hi->key.data, hi->key.len);
                     hi->value = h[i].value;
 
                     hi->lowcase_key = ngx_pnalloc(r->pool, hi->key.len);