Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
0a02a397
Commit
0a02a397
authored
Apr 14, 2014
by
Martin Blix Grydeland
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Date and Server headers also on backend error objects
parent
99193208
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
cache_fetch.c
bin/varnishd/cache/cache_fetch.c
+7
-1
No files found.
bin/varnishd/cache/cache_fetch.c
View file @
0a02a397
...
@@ -653,11 +653,14 @@ vbf_stp_error(struct worker *wrk, struct busyobj *bo)
...
@@ -653,11 +653,14 @@ vbf_stp_error(struct worker *wrk, struct busyobj *bo)
{
{
struct
storage
*
st
;
struct
storage
*
st
;
ssize_t
l
;
ssize_t
l
;
double
now
;
char
time_str
[
VTIM_FORMAT_SIZE
];
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
VSLb_ts_busyobj
(
bo
,
"Error"
,
W_TIM_real
(
wrk
));
now
=
W_TIM_real
(
wrk
);
VSLb_ts_busyobj
(
bo
,
"Error"
,
now
);
AN
(
bo
->
fetch_objcore
->
flags
&
OC_F_BUSY
);
AN
(
bo
->
fetch_objcore
->
flags
&
OC_F_BUSY
);
...
@@ -669,6 +672,9 @@ vbf_stp_error(struct worker *wrk, struct busyobj *bo)
...
@@ -669,6 +672,9 @@ vbf_stp_error(struct worker *wrk, struct busyobj *bo)
HTTP_Setup
(
bo
->
beresp
,
bo
->
ws
,
bo
->
vsl
,
SLT_BerespMethod
);
HTTP_Setup
(
bo
->
beresp
,
bo
->
ws
,
bo
->
vsl
,
SLT_BerespMethod
);
http_SetResp
(
bo
->
beresp
,
"HTTP/1.1"
,
503
,
"Backend fetch failed"
);
http_SetResp
(
bo
->
beresp
,
"HTTP/1.1"
,
503
,
"Backend fetch failed"
);
VTIM_format
(
now
,
time_str
);
http_PrintfHeader
(
bo
->
beresp
,
"Date: %s"
,
time_str
);
http_SetHeader
(
bo
->
beresp
,
"Server: Varnish"
);
bo
->
exp
.
t_origin
=
bo
->
t_prev
;
bo
->
exp
.
t_origin
=
bo
->
t_prev
;
bo
->
exp
.
ttl
=
0
;
bo
->
exp
.
ttl
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment