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
40ec4a6b
Commit
40ec4a6b
authored
Jul 14, 2014
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The chunk-counter is http/1 specific
parent
db403d95
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
cache.h
bin/varnishd/cache/cache.h
+1
-1
cache_http1_fsm.c
bin/varnishd/cache/cache_http1_fsm.c
+2
-2
No files found.
bin/varnishd/cache/cache.h
View file @
40ec4a6b
...
@@ -582,6 +582,7 @@ struct req {
...
@@ -582,6 +582,7 @@ struct req {
struct
{
struct
{
ssize_t
bytes_done
;
ssize_t
bytes_done
;
ssize_t
bytes_yet
;
ssize_t
bytes_yet
;
intptr_t
chunk_ctr
;
}
h1
;
/* HTTP1 specific */
}
h1
;
/* HTTP1 specific */
/* The busy objhead we sleep on */
/* The busy objhead we sleep on */
...
@@ -599,7 +600,6 @@ struct req {
...
@@ -599,7 +600,6 @@ struct req {
unsigned
char
wantbody
;
unsigned
char
wantbody
;
uint64_t
req_bodybytes
;
/* Parsed req bodybytes */
uint64_t
req_bodybytes
;
/* Parsed req bodybytes */
intptr_t
chunk_ctr
;
/* Parsed req bodybytes */
uint64_t
resp_hdrbytes
;
/* Scheduled resp hdrbytes */
uint64_t
resp_hdrbytes
;
/* Scheduled resp hdrbytes */
uint64_t
resp_bodybytes
;
/* Scheduled resp bodybytes */
uint64_t
resp_bodybytes
;
/* Scheduled resp bodybytes */
...
...
bin/varnishd/cache/cache_http1_fsm.c
View file @
40ec4a6b
...
@@ -286,7 +286,7 @@ http1_req_body_status(struct req *req)
...
@@ -286,7 +286,7 @@ http1_req_body_status(struct req *req)
return
(
REQ_BODY_PRESENT
);
return
(
REQ_BODY_PRESENT
);
}
}
if
(
http_HdrIs
(
req
->
http
,
H_Transfer_Encoding
,
"chunked"
))
{
if
(
http_HdrIs
(
req
->
http
,
H_Transfer_Encoding
,
"chunked"
))
{
req
->
chunk_ctr
=
-
1
;
req
->
h1
.
chunk_ctr
=
-
1
;
return
(
REQ_BODY_CHUNKED
);
return
(
REQ_BODY_CHUNKED
);
}
}
if
(
http_GetHdr
(
req
->
http
,
H_Transfer_Encoding
,
NULL
))
if
(
http_GetHdr
(
req
->
http
,
H_Transfer_Encoding
,
NULL
))
...
@@ -511,7 +511,7 @@ http1_iter_req_body(struct req *req, enum req_body_state_e bs,
...
@@ -511,7 +511,7 @@ http1_iter_req_body(struct req *req, enum req_body_state_e bs,
req
->
acct
.
req_bodybytes
+=
len
;
req
->
acct
.
req_bodybytes
+=
len
;
return
(
len
);
return
(
len
);
}
else
if
(
bs
==
REQ_BODY_CHUNKED
)
{
}
else
if
(
bs
==
REQ_BODY_CHUNKED
)
{
switch
(
HTTP1_Chunked
(
req
->
htc
,
&
req
->
chunk_ctr
,
&
err
,
switch
(
HTTP1_Chunked
(
req
->
htc
,
&
req
->
h1
.
chunk_ctr
,
&
err
,
&
req
->
acct
.
req_bodybytes
,
buf
,
&
len
))
{
&
req
->
acct
.
req_bodybytes
,
buf
,
&
len
))
{
case
H1CR_ERROR
:
case
H1CR_ERROR
:
VSLb
(
req
->
vsl
,
SLT_Debug
,
"CHUNKERR: %s"
,
err
);
VSLb
(
req
->
vsl
,
SLT_Debug
,
"CHUNKERR: %s"
,
err
);
...
...
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