Commit 929ad675 authored by Nils Goroll's avatar Nils Goroll

Some polishing

parent 3607151b
Pipeline #286 skipped
This is a running log of changes to libvmod-blobsynth.
libvmod-blobsynth 0.2 (unreleased)
libvmod-blobsynth 0.1 (2017-09-22)
--------------------------------
* The most recent release entry is at the top.
libvmod-blobsynth 0.1 (1970-01-01)
--------------------------------
* Add list items with changes done.
* Issues fixed could also be list entries.
If you need to, a paragraph or two of explanation for any complicated changes
is appreciated.
Make sure to mention any changing breaking user-visible interfaces. (function
names, type of arguments, order of arguments)
Initial release
......@@ -10,7 +10,9 @@ import blobsynth;
DESCRIPTION
===========
Quick hack to use blobs for synthetic responses.
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::
......
AC_PREREQ([2.68])
AC_INIT([libvmod-blobsynth], [0.1], [], [vmod-blobsynth])
AC_COPYRIGHT([Copyright (c) 2011-2016 Varnish Software AS])
AC_COPYRIGHT([Public Domain])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_SRCDIR(src/vmod_blobsynth.vcc)
......
......@@ -15,6 +15,7 @@ varnish v1 -vcl+backend {
}
sub vcl_recv {
# wrong, triggers error
blobsynth.synthetic(gif.get());
return(synth(200));
}
......@@ -28,11 +29,13 @@ varnish v1 -vcl+backend {
logexpect l1 -v v1 -g raw -d 1 {
expect 0 0 CLI {^Rd vcl.load}
expect 1001 * VCL_Error {^blobsynth.synthetic.. only valid in}
} -start
client c1 {
txreq -url "/"
rxresp
expect resp.http.Content-Length == 43
}
client c1 -run
......
#
# Copyright YOU (c) 1900.
# This is free and unencumbered software released into the public domain.
#
# (vmodtool requires this format.)
# See the LICENSE file contained in the source repository / distribution
#
$Module blobsynth 3 Blobsynth VMOD
......@@ -11,6 +11,9 @@ DESCRIPTION
$Function VOID synthetic(BLOB blob)
Create a synthetic response from *blob*.
Create a synthetic response from *blob*, equivalent to the
``synthetic()`` built-in function except for the argument type.
Has no effect outside ``vcl_synth`` and ``vcl_backend_error``.
Needs to be called from ``vcl_synth`` or
``vcl_backend_error``. Otherwise, the function has no effect other
than logging a ``VCL_Error`` message to VSL.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment