Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
8090cc73
Commit
8090cc73
authored
Sep 13, 2017
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document addition of {be}req.hash to 5.2.
parent
950c4d49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
upgrading-5.2.rst
doc/sphinx/whats-new/upgrading-5.2.rst
+18
-2
No files found.
doc/sphinx/whats-new/upgrading-5.2.rst
View file @
8090cc73
...
...
@@ -40,8 +40,24 @@ XXX: headline changes ...
``req.hash`` and ``bereq.hash``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*XXX: about {be}req.hash, mention data type BLOB, advise about*
*:ref:`vmod_blob(3)`*
Added ``req.hash`` and ``bereq.hash``, which contain the hash value
computed by Varnish for cache lookup in the current transaction, to
be used in client or backend context, respectively. Their data type
is BLOB, and they contain the raw binary hash.
You can use :ref:`vmod_blob(3)` to work with the hashes::
import blob;
sub vcl_backend_fetch {
# Send the transaction hash to the backend as a hex string
set bereq.http.Hash = blob.encode(HEX, blob=bereq.hash);
}
sub vcl_deliver {
# Send the hash in a response header as a base64 string
set resp.http.Hash = blob.encode(BASE64, blob=req.hash);
}
XXX: vcl_sub_XXX ...
~~~~~~~~~~~~~~~~~~~~
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment