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 wrap: on
line diff
--- a/s4-funcs.sh	Sun May 31 15:07:02 2020 +0900
+++ b/s4-funcs.sh	Sun May 31 15:41:28 2020 +0900
@@ -1177,8 +1177,8 @@
   path=${URL%/*}
   expire="`expire '' '%a, %d-%b-%Y %H:%M:%S GMT'`"
   for kv; do
-    # echo "Set-Cookie: $kv; expires=$expire; Path=$path"
-    echo "Set-Cookie: $kv; expires=$expire;"
+    echo "Set-Cookie: $kv; expires=$expire; Path=$path"
+    # echo "Set-Cookie: $kv; expires=$expire;"
   done
 )
 contenttype() {
@@ -1401,8 +1401,8 @@
 
 cgiinit() {
   session=`date +%F-$$`
-  tmpf=tmp/stream
   tmpd=`tmpd=$tmpdir mktempd`
+  tmpf=$tmpd/stream.$$
   tmpfiles=$tmpfiles" $tmpd"
   addsession $session
   getcookie
@@ -1413,7 +1413,6 @@
 		# 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"
 		;;

yatex.org