Commit 20306953 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

If we come into vcl_error{} with a non-3-digit error status, for instance

because vcl_recv does "return(error);", force the status to 501.

Fixes: #558


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4240 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent ebd9f4e6
......@@ -344,6 +344,9 @@ cnt_error(struct sess *sp)
CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
h = sp->obj->http;
if (sp->err_code < 100 || sp->err_code > 999)
sp->err_code = 501;
http_PutProtocol(w, sp->fd, h, "HTTP/1.1");
http_PutStatus(w, sp->fd, h, sp->err_code);
TIM_format(TIM_real(), date);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment