Commit 55b6619f authored by Petter Knudsen's avatar Petter Knudsen

There was no need to send the err_ttl as parameter as SYN_ErrorPage had access to the it directly.


git-svn-id: http://www.varnish-cache.org/svn/trunk@2950 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 3b51e823
......@@ -567,7 +567,7 @@ void RES_BuildHttp(struct sess *sp);
void RES_WriteObj(struct sess *sp);
/* cache_synthetic.c */
void SYN_ErrorPage(struct sess *sp, int status, const char *reason, int ttl);
void SYN_ErrorPage(struct sess *sp, int status, const char *reason);
/* cache_vary.c */
void VRY_Create(const struct sess *sp);
......
......@@ -309,7 +309,7 @@ cnt_error(struct sess *sp)
{
AZ(sp->obj);
SYN_ErrorPage(sp, sp->err_code, sp->err_reason, params->err_ttl);
SYN_ErrorPage(sp, sp->err_code, sp->err_reason);
sp->err_code = 0;
sp->err_reason = NULL;
sp->step = STP_DONE;
......@@ -878,7 +878,7 @@ cnt_start(struct sess *sp)
*sp->http0 = *sp->http;
if (done != 0) {
SYN_ErrorPage(sp, done, NULL, params->err_ttl); /* XXX: STP_ERROR ? */
SYN_ErrorPage(sp, done, NULL); /* XXX: STP_ERROR ? */
sp->step = STP_DONE;
return (0);
}
......
......@@ -47,7 +47,7 @@
*/
void
SYN_ErrorPage(struct sess *sp, int status, const char *reason, int ttl)
SYN_ErrorPage(struct sess *sp, int status, const char *reason)
{
struct http *h;
struct worker *w;
......@@ -86,7 +86,7 @@ SYN_ErrorPage(struct sess *sp, int status, const char *reason, int ttl)
TIM_format(now, date);
http_PrintfHeader(w, fd, h, "Date: %s", date);
http_PrintfHeader(w, fd, h, "Server: Varnish");
http_PrintfHeader(w, fd, h, "Retry-After: %d", ttl);
http_PrintfHeader(w, fd, h, "Retry-After: %d", params->err_ttl);
http_PrintfHeader(w, fd, h, "Content-Type: text/html; charset=utf-8");
http_PrintfHeader(w, sp->fd, sp->http, "X-Varnish: %u", sp->xid);
http_PrintfHeader(w, fd, h, "Connection: close");
......
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