From c22f240e5cef28ddb31e43b7138fe3ecf659d208 Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 18 Mar 2015 16:19:07 +0000 Subject: [PATCH] relative URI syntax in Location forwards svn path=/trunk/; revision=55 --- action.sh | 2 +- actions/edit_attendee.sh | 2 +- actions/edit_course.sh | 2 +- actions/filter_attendee.sh | 4 ++-- actions/new_attendee.sh | 2 +- actions/new_course.sh | 2 +- actions/update_attendee.sh | 10 +++++----- actions/update_course.sh | 12 ++++++------ 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/action.sh b/action.sh index 0c46d73..a0240d9 100755 --- 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 diff --git a/actions/edit_attendee.sh b/actions/edit_attendee.sh index 66e2266..a36a3d6 100644 --- a/actions/edit_attendee.sh +++ b/actions/edit_attendee.sh @@ -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" diff --git a/actions/edit_course.sh b/actions/edit_course.sh index 2b82561..abeae20 100644 --- a/actions/edit_course.sh +++ b/actions/edit_course.sh @@ -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" diff --git a/actions/filter_attendee.sh b/actions/filter_attendee.sh index 392964b..a18c1eb 100755 --- a/actions/filter_attendee.sh +++ b/actions/filter_attendee.sh @@ -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 diff --git a/actions/new_attendee.sh b/actions/new_attendee.sh index cc35038..c6d0301 100644 --- a/actions/new_attendee.sh +++ b/actions/new_attendee.sh @@ -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" diff --git a/actions/new_course.sh b/actions/new_course.sh index 1da05ce..7cd0826 100644 --- a/actions/new_course.sh +++ b/actions/new_course.sh @@ -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" diff --git a/actions/update_attendee.sh b/actions/update_attendee.sh index 51dece8..b6c38bc 100644 --- a/actions/update_attendee.sh +++ b/actions/update_attendee.sh @@ -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 diff --git a/actions/update_course.sh b/actions/update_course.sh index 4e75e64..0e1ee24 100644 --- a/actions/update_course.sh +++ b/actions/update_course.sh @@ -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 -- 2.39.2