Thanks for all the help, Michael.  That was a lot of work and a really big 
help to me.

I just figured out that the single quotes don't force literal 
interpretation of a variable name:

$ FILE=blah ; echo "Content-Disposition: attachment; filename='${FILE}.zip'"
Content-Disposition: attachment; filename='blah.zip'

I didn't know that.  I was expecting the output to look like this:

Content-Disposition: attachment; filename='${FILE}.zip'

I'm more confused now than I used to be about how quoting works:

$ FILE=blah ; echo '${FILE}'
${FILE}

$ FILE=blah ; echo ''${FILE}''
blah

More research is needed.

I see that you used the --quite option in your code before Yaron 
(freakzilla) recommended it:


On Mon, 24 Feb 2014, Michael Moore wrote:

> # Zip the requested directory into the temp file
>
> zip -0 --quiet -r $TMPFILE $(basename $REALPATH)



Thanks again.

Mike