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