s4
changeset 723:b8f5bfb91ea2
Save streaming file in $tmpd
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sun, 31 May 2020 15:41:28 +0900 |
parents | 78cc4ba7bf42 |
children | 489efda25567 |
files | s4-funcs.sh |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line diff
1.1 --- a/s4-funcs.sh Sun May 31 15:07:02 2020 +0900 1.2 +++ b/s4-funcs.sh Sun May 31 15:41:28 2020 +0900 1.3 @@ -1177,8 +1177,8 @@ 1.4 path=${URL%/*} 1.5 expire="`expire '' '%a, %d-%b-%Y %H:%M:%S GMT'`" 1.6 for kv; do 1.7 - # echo "Set-Cookie: $kv; expires=$expire; Path=$path" 1.8 - echo "Set-Cookie: $kv; expires=$expire;" 1.9 + echo "Set-Cookie: $kv; expires=$expire; Path=$path" 1.10 + # echo "Set-Cookie: $kv; expires=$expire;" 1.11 done 1.12 ) 1.13 contenttype() { 1.14 @@ -1401,8 +1401,8 @@ 1.15 1.16 cgiinit() { 1.17 session=`date +%F-$$` 1.18 - tmpf=tmp/stream 1.19 tmpd=`tmpd=$tmpdir mktempd` 1.20 + tmpf=$tmpd/stream.$$ 1.21 tmpfiles=$tmpfiles" $tmpd" 1.22 addsession $session 1.23 getcookie 1.24 @@ -1413,7 +1413,6 @@ 1.25 # cat > $tmpf # too much? 1.26 head -c $CONTENT_LENGTH > $tmpf # safe? 1.27 (echo CL=$CONTENT_LENGTH; ls -lF $tmpf) 1>&3 1.28 - cp tmp/stream /tmp # 2020-0531 1.29 s="`cat tmp/stream`" 1.30 tmpfiles=$tmpfiles"${tmpfiles+ }$tmpf" 1.31 ;;