Fix redirects

This commit is contained in:
Case Duckworth 2020-05-23 19:49:06 -05:00
parent b7f4dbe8d3
commit 40b7e1b98a
1 changed files with 7 additions and 3 deletions

10
bollux
View File

@ -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" ;;