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
a29507a1
Commit
a29507a1
authored
Oct 08, 2020
by
Dridi Boukelmoune
Committed by
Nils Goroll
Oct 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
http: Record which peer wants to close the session
Spotted by Martin.
parent
4bf0b9df
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
6 deletions
+9
-6
cache.h
bin/varnishd/cache/cache.h
+1
-1
cache_http.c
bin/varnishd/cache/cache_http.c
+5
-2
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+1
-1
cache_http1_fetch.c
bin/varnishd/http1/cache_http1_fetch.c
+1
-1
cache_http2_deliver.c
bin/varnishd/http2/cache_http2_deliver.c
+1
-1
No files found.
bin/varnishd/cache/cache.h
View file @
a29507a1
...
...
@@ -650,7 +650,7 @@ int HTTP_IterHdrPack(struct worker *, struct objcore *, const char **);
#define HTTP_FOREACH_PACK(wrk, oc, ptr) \
for ((ptr) = NULL; HTTP_IterHdrPack(wrk, oc, &(ptr));)
const
char
*
HTTP_GetHdrPack
(
struct
worker
*
,
struct
objcore
*
,
const
char
*
hdr
);
enum
sess_close
http_DoConnection
(
struct
http
*
hp
);
enum
sess_close
http_DoConnection
(
struct
http
*
hp
,
enum
sess_close
sc_close
);
int
http_IsFiltered
(
const
struct
http
*
hp
,
unsigned
u
,
unsigned
how
);
#define HTTPH_R_PASS (1 << 0)
/* Request (c->b) in pass mode */
...
...
bin/varnishd/cache/cache_http.c
View file @
a29507a1
...
...
@@ -730,12 +730,15 @@ http_GetContentLength(const struct http *hp)
*/
enum
sess_close
http_DoConnection
(
struct
http
*
hp
)
http_DoConnection
(
struct
http
*
hp
,
enum
sess_close
sc_close
)
{
const
char
*
h
,
*
b
,
*
e
;
enum
sess_close
retval
;
unsigned
u
,
v
;
CHECK_OBJ_NOTNULL
(
hp
,
HTTP_MAGIC
);
assert
(
sc_close
==
SC_REQ_CLOSE
||
sc_close
==
SC_RESP_CLOSE
);
if
(
hp
->
protover
==
10
)
retval
=
SC_REQ_HTTP10
;
else
...
...
@@ -748,7 +751,7 @@ http_DoConnection(struct http *hp)
while
(
http_split
(
&
h
,
NULL
,
","
,
&
b
,
&
e
))
{
u
=
pdiff
(
b
,
e
);
if
(
u
==
5
&&
!
strncasecmp
(
b
,
"close"
,
u
))
retval
=
SC_REQ_CLOSE
;
retval
=
sc_close
;
if
(
u
==
10
&&
!
strncasecmp
(
b
,
"keep-alive"
,
u
))
retval
=
SC_NULL
;
...
...
bin/varnishd/cache/cache_req_fsm.c
View file @
a29507a1
...
...
@@ -83,7 +83,7 @@ cnt_transport(struct worker *wrk, struct req *req)
AZ
(
req
->
err_code
);
req
->
doclose
=
http_DoConnection
(
req
->
http
);
req
->
doclose
=
http_DoConnection
(
req
->
http
,
SC_REQ_CLOSE
);
if
(
req
->
doclose
==
SC_RX_BAD
)
{
(
void
)
req
->
transport
->
minimal_response
(
req
,
400
);
return
(
REQ_FSM_DONE
);
...
...
bin/varnishd/http1/cache_http1_fetch.c
View file @
a29507a1
...
...
@@ -234,7 +234,7 @@ V1F_FetchRespHdr(struct busyobj *bo)
return
(
-
1
);
}
htc
->
doclose
=
http_DoConnection
(
hp
);
htc
->
doclose
=
http_DoConnection
(
hp
,
SC_RESP_CLOSE
);
/*
* Figure out how the fetch is supposed to happen, before the
...
...
bin/varnishd/http2/cache_http2_deliver.c
View file @
a29507a1
...
...
@@ -298,7 +298,7 @@ h2_deliver(struct req *req, struct boc *boc, int sendbody)
VSLb
(
req
->
vsl
,
SLT_RespProtocol
,
"HTTP/2.0"
);
(
void
)
http_DoConnection
(
req
->
resp
);
(
void
)
http_DoConnection
(
req
->
resp
,
SC_RESP_CLOSE
);
ss
=
WS_Snapshot
(
req
->
ws
);
...
...
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