MRDF-800 — Trying to subtitute a nonexisting string in a file
Sometimes the proxy needs to read a file and perform some string subtitutions in it. This feature is used, e.g., for passing customizable error messages to a client. The file is read twice.
During the first run, validity of substitution places in the file is checked and the total length of the file after substitutions is computed. In the second run, the substitutions are performed and the result is passed to the proxy for further processing. The set of substitution strings is provided by the proxy, the places for substitutions in the file are denoted by $1$, $2$, and so on. If the number of a string to substitute is greater than the actual number of available strings in the first run, this error is reported and the file cannot be used. This typically yields immediate session termination by the proxy.