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
b9708eac
Commit
b9708eac
authored
Jan 14, 2019
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a recently introduced issue with logging of ESI request headers.
parent
da3c0bd9
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
34 additions
and
9 deletions
+34
-9
cache.h
bin/varnishd/cache/cache.h
+2
-1
cache_esi_deliver.c
bin/varnishd/cache/cache_esi_deliver.c
+1
-1
cache_fetch.c
bin/varnishd/cache/cache_fetch.c
+1
-1
cache_http.c
bin/varnishd/cache/cache_http.c
+23
-3
cache_req.c
bin/varnishd/cache/cache_req.c
+1
-1
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+1
-1
cache_vrt.c
bin/varnishd/cache/cache_vrt.c
+1
-1
vrt.h
include/vrt.h
+4
-0
No files found.
bin/varnishd/cache/cache.h
View file @
b9708eac
...
...
@@ -595,7 +595,8 @@ extern pthread_t cli_thread;
/* cache_http.c */
unsigned
HTTP_estimate
(
unsigned
nhttp
);
void
HTTP_Copy
(
struct
http
*
to
,
const
struct
http
*
const
fm
);
void
HTTP_Clone
(
struct
http
*
to
,
const
struct
http
*
const
fm
);
void
HTTP_Dup
(
struct
http
*
to
,
const
struct
http
*
const
fm
);
struct
http
*
HTTP_create
(
void
*
p
,
uint16_t
nhttp
,
unsigned
);
const
char
*
http_Status2Reason
(
unsigned
,
const
char
**
);
unsigned
http_EstimateWS
(
const
struct
http
*
fm
,
unsigned
how
);
...
...
bin/varnishd/cache/cache_esi_deliver.c
View file @
b9708eac
...
...
@@ -141,7 +141,7 @@ ved_include(struct req *preq, const char *src, const char *host,
req
->
top
=
preq
->
top
;
HTTP_Setup
(
req
->
http
,
req
->
ws
,
req
->
vsl
,
SLT_ReqMethod
);
HTTP_
Copy
(
req
->
http
,
preq
->
http0
);
HTTP_
Dup
(
req
->
http
,
preq
->
http0
);
http_SetH
(
req
->
http
,
HTTP_HDR_URL
,
src
);
if
(
host
!=
NULL
&&
*
host
!=
'\0'
)
{
...
...
bin/varnishd/cache/cache_fetch.c
View file @
b9708eac
...
...
@@ -208,7 +208,7 @@ vbf_stp_mkbereq(struct worker *wrk, struct busyobj *bo)
HTTP_Setup
(
bo
->
bereq
,
bo
->
ws
,
bo
->
vsl
,
SLT_BereqMethod
);
bo
->
ws_bo
=
WS_Snapshot
(
bo
->
ws
);
HTTP_C
opy
(
bo
->
bereq
,
bo
->
bereq0
);
HTTP_C
lone
(
bo
->
bereq
,
bo
->
bereq0
);
if
(
bo
->
req
->
req_body_status
==
REQ_BODY_NONE
)
{
bo
->
req
=
NULL
;
...
...
bin/varnishd/cache/cache_http.c
View file @
b9708eac
...
...
@@ -190,19 +190,39 @@ http_Teardown(struct http *hp)
memset
(
hp
->
hdf
,
0
,
sizeof
*
hp
->
hdf
*
hp
->
shd
);
}
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------
* Duplicate the http content into another http
* We cannot just memcpy the struct because the hd & hdf are private
* storage to the struct http.
*/
void
HTTP_
Copy
(
struct
http
*
to
,
const
struct
http
*
const
fm
)
HTTP_
Dup
(
struct
http
*
to
,
const
struct
http
*
const
fm
)
{
assert
(
fm
->
nhd
<=
to
->
shd
);
memcpy
(
&
to
->
nhd
,
&
fm
->
nhd
,
sizeof
*
to
-
offsetof
(
struct
http
,
nhd
));
memcpy
(
to
->
hd
,
fm
->
hd
,
fm
->
nhd
*
sizeof
*
to
->
hd
);
memcpy
(
to
->
hdf
,
fm
->
hdf
,
fm
->
nhd
*
sizeof
*
to
->
hdf
);
to
->
nhd
=
fm
->
nhd
;
to
->
logtag
=
fm
->
logtag
;
to
->
status
=
fm
->
status
;
to
->
protover
=
fm
->
protover
;
}
/*--------------------------------------------------------------------
* Clone the entire http structure, including vsl & ws
*/
void
HTTP_Clone
(
struct
http
*
to
,
const
struct
http
*
const
fm
)
{
HTTP_Dup
(
to
,
fm
);
to
->
vsl
=
fm
->
vsl
;
to
->
ws
=
fm
->
ws
;
}
/*--------------------------------------------------------------------*/
void
...
...
bin/varnishd/cache/cache_req.c
View file @
b9708eac
...
...
@@ -189,7 +189,7 @@ Req_Rollback(struct req *req)
{
VCL_TaskLeave
(
req
->
vcl
,
req
->
privs
);
VCL_TaskEnter
(
req
->
vcl
,
req
->
privs
);
HTTP_C
opy
(
req
->
http
,
req
->
http0
);
HTTP_C
lone
(
req
->
http
,
req
->
http0
);
if
(
WS_Overflowed
(
req
->
ws
))
req
->
wrk
->
stats
->
ws_client_overflow
++
;
WS_Reset
(
req
->
ws
,
req
->
ws_req
);
...
...
bin/varnishd/cache/cache_req_fsm.c
View file @
b9708eac
...
...
@@ -94,7 +94,7 @@ cnt_transport(struct worker *wrk, struct req *req)
}
req
->
ws_req
=
WS_Snapshot
(
req
->
ws
);
HTTP_C
opy
(
req
->
http0
,
req
->
http
);
// For ESI & restart
HTTP_C
lone
(
req
->
http0
,
req
->
http
);
// For ESI & restart
req
->
req_step
=
R_STP_RECV
;
return
(
REQ_FSM_MORE
);
}
...
...
bin/varnishd/cache/cache_vrt.c
View file @
b9708eac
...
...
@@ -639,7 +639,7 @@ VRT_Rollback(VRT_CTX, VCL_HTTP hp)
// -> VBO_Rollback ?
VCL_TaskLeave
(
ctx
->
bo
->
vcl
,
ctx
->
bo
->
privs
);
VCL_TaskEnter
(
ctx
->
bo
->
vcl
,
ctx
->
bo
->
privs
);
HTTP_C
opy
(
ctx
->
bo
->
bereq
,
ctx
->
bo
->
bereq0
);
HTTP_C
lone
(
ctx
->
bo
->
bereq
,
ctx
->
bo
->
bereq0
);
WS_Reset
(
ctx
->
bo
->
bereq
->
ws
,
ctx
->
bo
->
ws_bo
);
WS_Reset
(
ctx
->
bo
->
ws
,
ctx
->
bo
->
ws_bo
);
}
else
...
...
include/vrt.h
View file @
b9708eac
...
...
@@ -52,6 +52,10 @@
* binary/load-time compatible, increment MAJOR version
*
*
* 9.0 (scheduled for 2019-03-15)
* HTTP_Copy() removed
* HTTP_Dup() added
* HTTP_Clone() added
* 8.0 (2018-09-15)
* VRT_Strands() added
* VRT_StrandsWS() added
...
...
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