From 40b7e1b98a57d8febf53df78b996796ed21be9b6 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 23 May 2020 19:49:06 -0500 Subject: Fix redirects --- bollux | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bollux b/bollux index 29bda1e..b319e9d 100755 --- a/bollux +++ b/bollux @@ -220,12 +220,13 @@ handle() { # handle URL < RESPONSE case "$code" in 1*) # INPUT log 3 "Input" - put "$meta" - ask "?" - bollux "$URL?$REPLY" + RDRS=0 # this is not a redirect + ask "$meta" QUERY + bollux "$URL?$QUERY" ;; 2*) # SUCCESS log 3 "Success" + RDRS=0 # this is not a redirect case "$code" in 20) log 5 "- OK" ;; 21) log 5 "- End of client certificate session" ;; @@ -246,6 +247,7 @@ handle() { # handle URL < RESPONSE ;; 4*) # TEMPORARY FAILURE log 2 "Temporary failure" + RDRS=0 # this is not a redirect case "$code" in 41) log 5 "- Server unavailable" ;; 42) log 5 "- CGI error" ;; @@ -257,6 +259,7 @@ handle() { # handle URL < RESPONSE ;; 5*) # PERMANENT FAILURE log 2 "Permanent failure" + RDRS=0 # this is not a redirect case "$code" in 51) log 5 "- Not found" ;; 52) log 5 "- No longer available" ;; @@ -268,6 +271,7 @@ handle() { # handle URL < RESPONSE ;; 6*) # CLIENT CERT REQUIRED log 2 "Client certificate required" + RDRS=0 # this is not a redirect case "$code" in 61) log 5 "- Transient cert requested" ;; 62) log 5 "- Authorized cert required" ;; -- cgit 1.4.1-21-gabe81