Send blobs as synthetic bodies from Varnish VCL
Find a file
Thibaut Artis 271eae22ff build: Don't use vcs_vmod_version if not present
Before that, when building from a system without
Git some Makefile steps would fail because without
it vmodtool.py would not generate the required
src/vmod_vcs_version.txt file to be present.
We now check if the file is already present or if
git is installed, if either condition is validated
then src/vmod_vcs_version.txt will be used, if not
it will not be used and a warning will be issued
at configure time.
2025-07-09 15:21:08 +02:00
src build: Don't use vcs_vmod_version if not present 2025-07-09 15:21:08 +02:00
.clang-tidy CI: Introduce clang-tidy 2025-07-03 18:49:07 +02:00
.gitignore Handle src/vmod_vcs_version.txt 2025-05-05 15:48:59 +02:00
.gitlab-ci.yml CI: Add a Gitlab CI pipeline configuration 2025-07-09 15:21:08 +02:00
.travis.yml a github tarball is not a dist 2017-09-18 17:12:44 +02:00
bootstrap Migrate to VCDK 2025-05-05 15:48:59 +02:00
CHANGES.rst Some polishing 2017-09-22 09:47:29 +02:00
configure.ac build: Don't use vcs_vmod_version if not present 2025-07-09 15:21:08 +02:00
COPYING Clear up copyright statements. 2015-03-16 15:38:34 +01:00
INSTALL.rst Migrate to VCDK 2025-05-05 15:48:59 +02:00
LICENSE Change license to public domain. 2015-03-03 16:16:08 +01:00
Makefile.am CI: Add coverage target to Makefile 2025-07-03 18:48:45 +02:00
README.rst Migrate to VCDK 2025-05-05 15:48:59 +02:00

..
.. NB:  This file is machine generated, DO NOT EDIT!
..
.. Edit ./vmod_blobsynth.vcc and run make instead
..

.. role:: ref(emphasis)

==============
vmod_blobsynth
==============

--------------------------
Binary Synthetic Responses
--------------------------

:Manual section: 3

SYNOPSIS
========

.. parsed-literal::

  import blobsynth [as name] [from "path"]
  
  VOID synthetic(BLOB blob)
  
DESCRIPTION
===========

Trivial vmod to use blobs for synthetic responses, intended only as a
transitional solution until support for generating synthetic responses
is generalised in Varnish Cache.

Example::

	import blob;
	import blobsynth;

	sub vcl_init {
		new gif = blob.blob(BASE64,
			"R0lGODlhAQABAPAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==");
	}

	sub vcl_synth {
		set resp.http.Content-Type = "image/gif";
		blobsynth.synthetic(gif.get());
		return (deliver);
	}

.. _blobsynth.synthetic():

VOID synthetic(BLOB blob)
-------------------------

Create a synthetic response from *blob*, equivalent to the
``synthetic()`` built-in function except for the argument type.

Restricted to: ``vcl_synth``, ``vcl_backend_error``.



COPYRIGHT
=========

::

  This is free and unencumbered software released into the public domain.
 
  See the LICENSE file contained in the source repository / distribution