[master] e6e706104 Be clear that you should never try to std.fileread() a jpeg.

Lasse Karstensen lasse at isokron.no
Tue Nov 5 09:07:09 UTC 2019


commit e6e706104f2d1b06e66e5ec23d38386b1e037513
Author: Lasse Karstensen <lasse at isokron.no>
Date:   Tue Nov 5 10:05:46 2019 +0100

    Be clear that you should never try to std.fileread() a jpeg.

diff --git a/lib/libvmod_std/vmod.vcc b/lib/libvmod_std/vmod.vcc
index 1a12d9fc8..d1af75f3c 100644
--- a/lib/libvmod_std/vmod.vcc
+++ b/lib/libvmod_std/vmod.vcc
@@ -188,6 +188,8 @@ $Function STRING fileread(PRIV_CALL, STRING)
 Reads a file and returns a string with the content. The result is
 cached indefinitely per filename.
 
+This function should not be used for reading binary files.
+
 Example::
 
 	synthetic("Response was served by " + std.fileread("/etc/hostname"));


More information about the varnish-commit mailing list