s4

changeset 729:b73e2399994c

merged
author HIROSE Yuuji <yuuji@gentei.org>
date Sun, 31 May 2020 21:30:29 +0900
parents 398df4c7cd27 01be32e89ccd
children 98702a1251cd
files s4-funcs.sh
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line diff
     1.1 --- a/s4-funcs.sh	Sun May 31 20:49:30 2020 +0900
     1.2 +++ b/s4-funcs.sh	Sun May 31 21:30:29 2020 +0900
     1.3 @@ -1403,8 +1403,8 @@
     1.4  
     1.5  cgiinit() {
     1.6    session=`date +%F-$$`
     1.7 -  tmpf=tmp/stream
     1.8    tmpd=`tmpd=$tmpdir mktempd`
     1.9 +  tmpf=$tmpd/stream.$$
    1.10    tmpfiles=$tmpfiles" $tmpd"
    1.11    addsession $session
    1.12    getcookie
    1.13 @@ -1415,9 +1415,7 @@
    1.14  		# cat > $tmpf		# too much?
    1.15  		head -c $CONTENT_LENGTH > $tmpf	# safe?
    1.16        		(echo CL=$CONTENT_LENGTH; ls -lF $tmpf) 1>&3
    1.17 -		cp tmp/stream /tmp	# 2020-0531
    1.18 -		s="`cat tmp/stream`"
    1.19 -		tmpfiles=$tmpfiles"${tmpfiles+ }$tmpf"
    1.20 +		s="`cat $tmpf`"
    1.21  		;;
    1.22    esac
    1.23    case "$CONTENT_TYPE" in
    1.24 @@ -1463,6 +1461,9 @@
    1.25  		mogrify -quality 75 -resize $maximagexy'>' "$tmpd/$v"
    1.26  		err "Mogrified: `ls -lF $tmpd/$v`"	# 2020-05-31
    1.27  		;;
    1.28 +	      [Aa]pplication/*-empty)
    1.29 +		err "Stream-Empty found: [$v]"; cp "$tmpf" tmp/
    1.30 +		;;
    1.31  	    esac
    1.32  	    if ! echo "$mimetype" | egrep "$file_accept_egrep" >/dev/null 2>&1
    1.33  	    then