File: //proc/thread-self/root/usr/share/doc/varnish-6.0.3/html/users-guide/vcl-variables.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Request and response VCL objects — Varnish version 6.0.3 documentation</title>
<link rel="stylesheet" href="../_static/classic.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="actions" href="vcl-actions.html" />
<link rel="prev" title="Built in subroutines" href="vcl-built-in-subs.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="vcl-actions.html" title="actions"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="vcl-built-in-subs.html" title="Built in subroutines"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Varnish version 6.0.3 documentation</a> »</li>
<li class="nav-item nav-item-1"><a href="index.html" >The Varnish Users Guide</a> »</li>
<li class="nav-item nav-item-2"><a href="vcl.html" accesskey="U">VCL - Varnish Configuration Language</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="request-and-response-vcl-objects">
<h1>Request and response VCL objects<a class="headerlink" href="#request-and-response-vcl-objects" title="Permalink to this headline">ΒΆ</a></h1>
<p>In VCL, there several important objects that you need to be aware of. These
objects can be accessed and manipulated using VCL.</p>
<dl class="docutils">
<dt><em>req</em></dt>
<dd>The request object. When Varnish has received the request the <cite>req</cite> object is
created and populated. Most of the work you do in <cite>vcl_recv</cite> you
do on or with the <cite>req</cite> object.</dd>
<dt><em>bereq</em></dt>
<dd>The backend request object. Varnish constructs this before sending it to the
backend. It is based on the <cite>req</cite> object.</dd>
</dl>
<dl class="docutils">
<dt><em>beresp</em></dt>
<dd>The backend response object. It contains the headers of the object
coming from the backend. If you want to modify the response coming from the
server you modify this object in <cite>vcl_backend_response</cite>.</dd>
<dt><em>resp</em></dt>
<dd>The HTTP response right before it is delivered to the client. It is
typically modified in <cite>vcl_deliver</cite>.</dd>
<dt><em>obj</em></dt>
<dd>The object as it is stored in cache. Read only.</dd>
</dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="vcl-built-in-subs.html"
title="previous chapter">Built in subroutines</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="vcl-actions.html"
title="next chapter">actions</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/users-guide/vcl-variables.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="vcl-actions.html" title="actions"
>next</a> |</li>
<li class="right" >
<a href="vcl-built-in-subs.html" title="Built in subroutines"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Varnish version 6.0.3 documentation</a> »</li>
<li class="nav-item nav-item-1"><a href="index.html" >The Varnish Users Guide</a> »</li>
<li class="nav-item nav-item-2"><a href="vcl.html" >VCL - Varnish Configuration Language</a> »</li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2010-2014, Varnish Software AS.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.6.
</div>
</body>
</html>