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
a97bff7e
Commit
a97bff7e
authored
Apr 05, 2016
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass the max number of bytes to be received into SES_RxStuff() as parameter.
parent
f9f6b2a4
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
7 deletions
+9
-7
cache.h
bin/varnishd/cache/cache.h
+1
-1
cache_session.c
bin/varnishd/cache/cache_session.c
+3
-2
cache_http1_fetch.c
bin/varnishd/http1/cache_http1_fetch.c
+1
-1
cache_http1_fsm.c
bin/varnishd/http1/cache_http1_fsm.c
+2
-1
cache_proxy_proto.c
bin/varnishd/proxy/cache_proxy_proto.c
+2
-2
No files found.
bin/varnishd/cache/cache.h
View file @
a97bff7e
...
...
@@ -965,7 +965,7 @@ enum htc_status_e {
void
SES_RxInit
(
struct
http_conn
*
htc
,
struct
ws
*
ws
,
unsigned
maxbytes
);
void
SES_RxReInit
(
struct
http_conn
*
htc
);
enum
htc_status_e
SES_RxStuff
(
struct
http_conn
*
,
htc_complete_f
*
,
double
*
t1
,
double
*
t2
,
double
ti
,
double
tn
);
double
*
t1
,
double
*
t2
,
double
ti
,
double
tn
,
int
maxbytes
);
#define SESS_ATTR(UP, low, typ, len) \
int SES_Set_##low(const struct sess *sp, const typ *src); \
...
...
bin/varnishd/cache/cache_session.c
View file @
a97bff7e
...
...
@@ -236,7 +236,7 @@ SES_RxReInit(struct http_conn *htc)
enum
htc_status_e
SES_RxStuff
(
struct
http_conn
*
htc
,
htc_complete_f
*
func
,
double
*
t1
,
double
*
t2
,
double
ti
,
double
tn
)
double
*
t1
,
double
*
t2
,
double
ti
,
double
tn
,
int
maxbytes
)
{
double
tmo
;
double
now
;
...
...
@@ -275,7 +275,8 @@ SES_RxStuff(struct http_conn *htc, htc_complete_f *func,
tmo
=
tn
-
now
;
if
(
!
isnan
(
ti
)
&&
ti
<
tn
)
tmo
=
ti
-
now
;
i
=
(
htc
->
ws
->
r
-
htc
->
rxbuf_e
)
-
1
;
/* space for NUL */
i
=
(
htc
->
rxbuf_e
-
htc
->
rxbuf_b
)
+
1L
;
/* space for NUL */
i
=
maxbytes
-
i
;
if
(
i
<=
0
)
{
WS_ReleaseP
(
htc
->
ws
,
htc
->
rxbuf_b
);
return
(
HTC_S_OVERFLOW
);
...
...
bin/varnishd/http1/cache_http1_fetch.c
View file @
a97bff7e
...
...
@@ -157,7 +157,7 @@ V1F_FetchRespHdr(struct busyobj *bo)
t
=
VTIM_real
()
+
htc
->
first_byte_timeout
;
hs
=
SES_RxStuff
(
htc
,
HTTP1_Complete
,
NULL
,
NULL
,
t
,
t
+
htc
->
between_bytes_timeout
);
t
,
t
+
htc
->
between_bytes_timeout
,
cache_param
->
http_resp_size
);
if
(
hs
!=
HTC_S_COMPLETE
)
{
bo
->
acct
.
beresp_hdrbytes
+=
htc
->
rxbuf_e
-
htc
->
rxbuf_b
;
...
...
bin/varnishd/http1/cache_http1_fsm.c
View file @
a97bff7e
...
...
@@ -323,7 +323,8 @@ HTTP1_Session(struct worker *wrk, struct req *req)
hs
=
SES_RxStuff
(
req
->
htc
,
HTTP1_Complete
,
&
req
->
t_first
,
&
req
->
t_req
,
sp
->
t_idle
+
cache_param
->
timeout_linger
,
sp
->
t_idle
+
cache_param
->
timeout_idle
);
sp
->
t_idle
+
cache_param
->
timeout_idle
,
cache_param
->
http_req_size
);
XXXAZ
(
req
->
htc
->
ws
->
r
);
if
(
hs
<
HTC_S_EMPTY
)
{
req
->
acct
.
req_hdrbytes
+=
...
...
bin/varnishd/proxy/cache_proxy_proto.c
View file @
a97bff7e
...
...
@@ -351,8 +351,8 @@ vpx_new_session(struct worker *wrk, void *arg)
assert
(
sizeof
vpx2_sig
==
12
);
hs
=
SES_RxStuff
(
req
->
htc
,
vpx_complete
,
NULL
,
NULL
,
NAN
,
sp
->
t_idle
+
cache_param
->
timeout_idle
);
XXXAZ
(
req
->
htc
->
ws
->
r
);
NULL
,
NULL
,
NAN
,
sp
->
t_idle
+
cache_param
->
timeout_idle
,
1024
);
// XXX ?
if
(
hs
!=
HTC_S_COMPLETE
)
{
Req_Release
(
req
);
SES_Delete
(
sp
,
SC_RX_JUNK
,
NAN
);
...
...
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