Send blobs as synthetic bodies from Varnish VCL
  • Makefile 49.8%
  • M4 32.5%
  • C 12.1%
  • Shell 5.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-03-30 16:25:55 +02:00
src Vinylize 2026-03-30 16:25:55 +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 Vinylize 2026-03-30 16:25:55 +02:00
bootstrap Vinylize 2026-03-30 16:25:55 +02:00
CHANGES.rst Some polishing 2017-09-22 09:47:29 +02:00
configure.ac Vinylize 2026-03-30 16:25:55 +02:00
COPYING Clear up copyright statements. 2015-03-16 15:38:34 +01:00
INSTALL.rst Vinylize 2026-03-30 16:25:55 +02:00
LICENSE Change license to public domain. 2015-03-03 16:16:08 +01:00
Makefile.am Vinylize 2026-03-30 16:25:55 +02:00
README.rst Vinylize 2026-03-30 16:25:55 +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 Vinyl 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``.

VARNISH-CACHE
=============

As of 2026-03-16 and version 9.0 Varnish-Cache has been rebranded as
Vinyl Cache, this repository contains a 8.0 branch which works with
Varnish-Cache 8.0.

COPYRIGHT
=========

::

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