Skip to content
Browse files

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

  • Loading branch information...
Lasse Karstensen
Lasse Karstensen committed Nov 5, 2019
1 parent e50acd5 commit e6e706104f2d1b06e66e5ec23d38386b1e037513
Showing with 2 additions and 0 deletions.
  1. +2 −0 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.


synthetic("Response was served by " + std.fileread("/etc/hostname"));

0 comments on commit e6e7061

Please sign in to comment.
You can’t perform that action at this time.