# HG changeset patch # User HIROSE Yuuji # Date 1590928229 -32400 # Node ID b73e2399994cc8acc4f0e57d4d364e01d37e9167 # Parent 398df4c7cd27e7c773bc40cd1d63771d105c9e8d# Parent 01be32e89ccd3dda94588905d015e7da3bd8a6f5 merged diff -r 398df4c7cd27 -r b73e2399994c s4-funcs.sh --- a/s4-funcs.sh Sun May 31 20:49:30 2020 +0900 +++ b/s4-funcs.sh Sun May 31 21:30:29 2020 +0900 @@ -1403,8 +1403,8 @@ cgiinit() { session=`date +%F-$$` - tmpf=tmp/stream tmpd=`tmpd=$tmpdir mktempd` + tmpf=$tmpd/stream.$$ tmpfiles=$tmpfiles" $tmpd" addsession $session getcookie @@ -1415,9 +1415,7 @@ # cat > $tmpf # too much? head -c $CONTENT_LENGTH > $tmpf # safe? (echo CL=$CONTENT_LENGTH; ls -lF $tmpf) 1>&3 - cp tmp/stream /tmp # 2020-0531 - s="`cat tmp/stream`" - tmpfiles=$tmpfiles"${tmpfiles+ }$tmpf" + s="`cat $tmpf`" ;; esac case "$CONTENT_TYPE" in @@ -1463,6 +1461,9 @@ mogrify -quality 75 -resize $maximagexy'>' "$tmpd/$v" err "Mogrified: `ls -lF $tmpd/$v`" # 2020-05-31 ;; + [Aa]pplication/*-empty) + err "Stream-Empty found: [$v]"; cp "$tmpf" tmp/ + ;; esac if ! echo "$mimetype" | egrep "$file_accept_egrep" >/dev/null 2>&1 then