summaryrefslogtreecommitdiff
path: root/src/tipideed
diff options
context:
space:
mode:
Diffstat (limited to 'src/tipideed')
-rw-r--r--src/tipideed/cgi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tipideed/cgi.c b/src/tipideed/cgi.c
index c2c62a1..3a9234c 100644
--- a/src/tipideed/cgi.c
+++ b/src/tipideed/cgi.c
@@ -305,8 +305,8 @@ static inline int process_cgi_output (tipidee_rql *rql, tipidee_headers const *h
if (!m || (x[m] && x[m] != ' '))
die502x(rql, 2, "cgi ", cginame, " returned an invalid ", "Status", " header") ;
reason_phrase = x[m] ? x + m + 1 : "" ;
- if (status >= 300 && status < 399 && !location)
- die502x(rql, 2, "cgi ", cginame, " returned a 3xx status code without a ", "Location", " header") ;
+ if (!location && (status == 301 || status == 302 || status == 307 || status == 308))
+ die502x(rql, 2, "cgi ", cginame, " returned a redirection status code without a ", "Location", " header") ;
if (status < 100 || status > 999)
die502x(rql, 2, "cgi ", cginame, " returned an invalid ", "Status", " value") ;
}