changeset 729:b73e2399994c

merged
author HIROSE Yuuji <yuuji@gentei.org>
date Sun, 31 May 2020 21:30:29 +0900
parents 398df4c7cd27 (current diff) 01be32e89ccd (diff)
children 98702a1251cd
files s4-funcs.sh
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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

yatex.org