]> git.plutz.net Git - confetti/commitdiff
relative URI syntax in Location forwards
authorpaul <paul@plutz.net>
Wed, 18 Mar 2015 16:19:07 +0000 (16:19 +0000)
committerpaul <paul@plutz.net>
Wed, 18 Mar 2015 16:19:07 +0000 (16:19 +0000)
svn path=/trunk/; revision=55

action.sh
actions/edit_attendee.sh
actions/edit_course.sh
actions/filter_attendee.sh
actions/new_attendee.sh
actions/new_course.sh
actions/update_attendee.sh
actions/update_course.sh

index 0c46d73d2027cd89ba994590bc2f0559443dd92f..a0240d932d0f718a5088d44d3b942f61dce66c3c 100755 (executable)
--- a/action.sh
+++ b/action.sh
@@ -19,6 +19,6 @@
 
 ACTION="$(echo "$_GET[\"action\"]" |egrep '^[a-zA-Z0-9_-]+$')"
 ACTION="${_EXEC}/actions/${ACTION}.sh"
-[ -x "$ACTION" ] || echo -n "Location: http://$HTTP_HOST/?page=error\n\n"
+[ -x "$ACTION" ] || echo -n "Location: ?page=error\n\n"
 
 . $ACTION
index 66e226661dba9780ac8d3a21423db3126fb755f8..a36a3d638abf599b4e8bf3d63d1fe5658c044a1c 100644 (file)
@@ -24,4 +24,4 @@ filter="&filter=$_REF[\"filter\"]"
 filtertype="&filtertype=$_REF[\"filtertype\"]"
 order="&order=$_REF[\"order\"]"
 
-echo -n "Location: http://$HTTP_HOST/?page=attendees${filter}${filtertype}${order}&edit=$card\n\n"
+echo -n "Location: ?page=attendees${filter}${filtertype}${order}&edit=$card\n\n"
index 2b825619d494b8b6f75c4faff2ce28d7f51ea06f..abeae20a8b1d8beb99aeac022b1d5ec53bed01ce 100644 (file)
@@ -19,4 +19,4 @@
 
 course="$_GET[\"course\"]"
 
-echo -n "Location: http://$HTTP_HOST/?page=courses&edit=$course\n\n"
+echo -n "Location: ?page=courses&edit=$course\n\n"
index 392964b62d8c8f714eb8b8506bc9f08a53c9127c..a18c1ebae29e7c09a08b52e288ace4f0ac44889f 100755 (executable)
@@ -24,9 +24,9 @@ case "$_POST[\"choice\"]"; in
     filter="$_POST[\"filter\"]"
     filtertype="$_POST[\"filtertype\"]"
     order="$_POST[\"order\"]"
-    echo -n "Location: http://$HTTP_HOST/?page=attendees&filter=$filter&filtertype=$filtertype&order=$order\n\n"
+    echo -n "Location: ?page=attendees&filter=$filter&filtertype=$filtertype&order=$order\n\n"
     ;;
   *)
-    echo -n "Location: http://$HTTP_HOST/?page=attendees\n\n"
+    echo -n "Location: ?page=attendees\n\n"
     ;;
 esac
index cc350385a2353bb68d884adb488a14feb8502d89..c6d0301a855636ffc6e546fd4916306b666de458 100644 (file)
@@ -42,4 +42,4 @@ UID:$uid
 END:VCARD
 EOF
 
-echo -n "Location: http://$HTTP_HOST/?page=attendees${filter}${filtertype}${order}&edit=$card\n\n"
+echo -n "Location: ?page=attendees${filter}${filtertype}${order}&edit=$card\n\n"
index 1da05ce904bf778da11c6fe39179fb978a734466..7cd0826b57305172238422cf26f651cfdda17413 100644 (file)
@@ -43,4 +43,4 @@ END:VEVENT
 END:VCARD
 EOF
 
-echo -n "Location: http://$HTTP_HOST/?page=courses&edit=$course\n\n"
+echo -n "Location: ?page=courses&edit=$course\n\n"
index 51dece85a676701cb1f33cbad6d0fe87a07d263c..b6c38bcdd621490c1119fa89b9a70cb1529bb989 100644 (file)
@@ -54,7 +54,7 @@ case "$_POST[\"action\"]" in
   addfield)
     echo "$_POST[\"newfield\"]:\r" >>"$tempfile"
     echo "END:VCARD\r" >>"$tempfile"
-    echo -n "Location: http://$HTTP_HOST/?page=attendees${filter}${filtertype}${order}&edit=$card\n\n"
+    echo -n "Location: ?page=attendees${filter}${filtertype}${order}&edit=$card\n\n"
     ;;
   update)
     attendance=()
@@ -74,16 +74,16 @@ case "$_POST[\"action\"]" in
 
     echo "END:VCARD\r" >>"$tempfile"
     mv "$tempfile" "$cardfile"
-    echo -n "Location: http://$HTTP_HOST/?page=attendees${filter}${filtertype}${order}#$card\n\n"
+    echo -n "Location: ?page=attendees${filter}${filtertype}${order}#$card\n\n"
     ;;
   cancel)
     rm "$tempfile"
     [ -f "$cardfile" ] \
-      && echo -n "Location: http://$HTTP_HOST/?page=attendees${filter}${filtertype}${order}#$card\n\n" \
-      || echo -n "Location: http://$HTTP_HOST/?page=attendees${filter}${filtertype}${order}\n\n"
+      && echo -n "Location: ?page=attendees${filter}${filtertype}${order}#$card\n\n" \
+      || echo -n "Location: ?page=attendees${filter}${filtertype}${order}\n\n"
     ;;
   delete)
     rm "$tempfile" "$cardfile"
-    echo -n "Location: http://$HTTP_HOST/?page=attendees${filter}${filtertype}${order}\n\n"
+    echo -n "Location: ?page=attendees${filter}${filtertype}${order}\n\n"
     ;;
 esac
index 4e75e6460724c644d808d8a23928bebebad3c5e5..0e1ee244a50380072087bdaa467cdeec41bbbdd6 100644 (file)
@@ -88,27 +88,27 @@ case "$_POST[\"action\"]" in
     echo "$_POST[\"newfield\"]:\r" >>"$tempfile"
     echo "END:VEVENT\r" >>"$tempfile"
     echo "END:VCALENDAR\r" >>"$tempfile"
-    echo -n "Location: http://$HTTP_HOST/?page=courses&edit=$course\n\n"
+    echo -n "Location: ?page=courses&edit=$course\n\n"
     ;;
   update)
     echo "END:VEVENT\r" >>"$tempfile"
     echo "END:VCALENDAR\r" >>"$tempfile"
     mv "$tempfile" "$coursefile"
-    echo -n "Location: http://$HTTP_HOST/?page=courses#$course\n\n"
+    echo -n "Location: ?page=courses#$course\n\n"
     ;;
   cancel)
     rm "$tempfile"
     [ -f "$coursefile" ] \
-      && echo -n "Location: http://$HTTP_HOST/?page=courses#$course\n\n" \
-      || echo -n "Location: http://$HTTP_HOST/?page=courses\n\n"
+      && echo -n "Location: ?page=courses#$course\n\n" \
+      || echo -n "Location: ?page=courses\n\n"
     ;;
   delete)
     rm "$tempfile" "$coursefile"
-    echo -n "Location: http://$HTTP_HOST/?page=courses\n\n"
+    echo -n "Location: ?page=courses\n\n"
     ;;
   *)
     echo "END:VEVENT\r" >>"$tempfile"
     echo "END:VCALENDAR\r" >>"$tempfile"
-    echo -n "Location: http://$HTTP_HOST/?page=courses&edit=$course\n\n"
+    echo -n "Location: ?page=courses&edit=$course\n\n"
     ;;
 esac