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
7221cf79
Commit
7221cf79
authored
Sep 10, 2014
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename REQ_BODY_ modes to WITH[OUT]_LEN rather than transmission mode.
parent
fdee70d7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
17 deletions
+17
-17
cache.h
bin/varnishd/cache/cache.h
+1
-1
cache_http1_fetch.c
bin/varnishd/cache/cache_http1_fetch.c
+1
-1
cache_http1_fsm.c
bin/varnishd/cache/cache_http1_fsm.c
+11
-11
cache_session.c
bin/varnishd/cache/cache_session.c
+1
-1
r01581.vtc
bin/varnishtest/tests/r01581.vtc
+1
-1
req_body.h
include/tbl/req_body.h
+2
-2
No files found.
bin/varnishd/cache/cache.h
View file @
7221cf79
...
...
@@ -1111,7 +1111,7 @@ void SES_Delete(struct sess *sp, enum sess_close reason, double now);
struct
sesspool
*
SES_NewPool
(
struct
pool
*
pp
,
unsigned
pool_no
);
void
SES_DeletePool
(
struct
sesspool
*
sp
);
int
SES_ScheduleReq
(
struct
req
*
);
struct
req
*
SES_GetReq
(
struct
worker
*
,
struct
sess
*
);
struct
req
*
SES_GetReq
(
const
struct
worker
*
,
struct
sess
*
);
void
SES_Handle
(
struct
sess
*
sp
,
double
now
);
void
SES_ReleaseReq
(
struct
req
*
);
pool_func_t
SES_pool_accept_task
;
...
...
bin/varnishd/cache/cache_http1_fetch.c
View file @
7221cf79
...
...
@@ -139,7 +139,7 @@ V1F_fetch_hdr(struct worker *wrk, struct busyobj *bo, struct req *req)
if
(
!
http_GetHdr
(
bo
->
bereq
,
H_Host
,
NULL
))
VDI_AddHostHeader
(
bo
->
bereq
,
vc
);
if
(
req
!=
NULL
&&
req
->
req_body_status
==
REQ_BODY_
CHUNKED
)
{
if
(
req
!=
NULL
&&
req
->
req_body_status
==
REQ_BODY_
WITHOUT_LEN
)
{
http_PrintfHeader
(
hp
,
"Transfer-Encoding: chunked"
);
do_chunked
=
1
;
}
...
...
bin/varnishd/cache/cache_http1_fsm.c
View file @
7221cf79
...
...
@@ -298,13 +298,13 @@ http1_dissect(struct worker *wrk, struct req *req)
assert
(
req
->
req_body_status
==
REQ_BODY_INIT
);
if
(
req
->
htc
->
body_status
==
BS_CHUNKED
)
{
req
->
req_body_status
=
REQ_BODY_
CHUNKED
;
req
->
req_body_status
=
REQ_BODY_
WITHOUT_LEN
;
}
else
if
(
req
->
htc
->
body_status
==
BS_LENGTH
)
{
req
->
req_body_status
=
REQ_BODY_
PRESENT
;
req
->
req_body_status
=
REQ_BODY_
WITH_LEN
;
}
else
if
(
req
->
htc
->
body_status
==
BS_NONE
)
{
req
->
req_body_status
=
REQ_BODY_NONE
;
}
else
if
(
req
->
htc
->
body_status
==
BS_EOF
)
{
req
->
req_body_status
=
REQ_BODY_
CHUNKED
;
req
->
req_body_status
=
REQ_BODY_
WITHOUT_LEN
;
}
else
{
WRONG
(
"Unknown req.body_length situation"
);
}
...
...
@@ -462,8 +462,8 @@ HTTP1_IterateReqBody(struct req *req, req_body_iter_f *func, void *priv)
return
(
0
);
case
REQ_BODY_NONE
:
return
(
0
);
case
REQ_BODY_
PRESENT
:
case
REQ_BODY_
CHUNKED
:
case
REQ_BODY_
WITH_LEN
:
case
REQ_BODY_
WITHOUT_LEN
:
break
;
case
REQ_BODY_TAKEN
:
VSLb
(
req
->
vsl
,
SLT_VCL_Error
,
...
...
@@ -477,8 +477,8 @@ HTTP1_IterateReqBody(struct req *req, req_body_iter_f *func, void *priv)
WRONG
(
"Wrong req_body_status in HTTP1_IterateReqBody()"
);
}
Lck_Lock
(
&
req
->
sp
->
mtx
);
if
(
req
->
req_body_status
==
REQ_BODY_
PRESENT
||
req
->
req_body_status
==
REQ_BODY_
CHUNKED
)
{
if
(
req
->
req_body_status
==
REQ_BODY_
WITH_LEN
||
req
->
req_body_status
==
REQ_BODY_
WITHOUT_LEN
)
{
req
->
req_body_status
=
REQ_BODY_TAKEN
;
i
=
0
;
}
else
...
...
@@ -545,8 +545,8 @@ int
HTTP1_DiscardReqBody
(
struct
req
*
req
)
{
if
(
req
->
req_body_status
==
REQ_BODY_
PRESENT
||
req
->
req_body_status
==
REQ_BODY_
CHUNKED
)
if
(
req
->
req_body_status
==
REQ_BODY_
WITH_LEN
||
req
->
req_body_status
==
REQ_BODY_
WITHOUT_LEN
)
(
void
)
HTTP1_IterateReqBody
(
req
,
httpq_req_body_discard
,
NULL
);
return
(
0
);
}
...
...
@@ -575,8 +575,8 @@ HTTP1_CacheReqBody(struct req *req, ssize_t maxsize)
return
(
-
1
);
case
REQ_BODY_NONE
:
return
(
0
);
case
REQ_BODY_
CHUNKED
:
case
REQ_BODY_
PRESENT
:
case
REQ_BODY_
WITHOUT_LEN
:
case
REQ_BODY_
WITH_LEN
:
break
;
default:
WRONG
(
"Wrong req_body_status in HTTP1_CacheReqBody()"
);
...
...
bin/varnishd/cache/cache_session.c
View file @
7221cf79
...
...
@@ -315,7 +315,7 @@ SES_Delete(struct sess *sp, enum sess_close reason, double now)
*/
struct
req
*
SES_GetReq
(
struct
worker
*
wrk
,
struct
sess
*
sp
)
SES_GetReq
(
const
struct
worker
*
wrk
,
struct
sess
*
sp
)
{
struct
sesspool
*
pp
;
struct
req
*
req
;
...
...
bin/varnishtest/tests/r01581.vtc
View file @
7221cf79
...
...
@@ -11,7 +11,7 @@ varnish v1 -vcl+backend {
logexpect l1 -v v1 -g request {
expect 0 1001 Begin
expect * = ReqStart
expect * =
End
expect * = End
} -start
client c1 {
...
...
include/tbl/req_body.h
View file @
7221cf79
...
...
@@ -30,8 +30,8 @@
/*lint -save -e525 -e539 */
REQ_BODY
(
INIT
)
REQ_BODY
(
PRESENT
)
REQ_BODY
(
CHUNKED
)
REQ_BODY
(
WITHOUT_LEN
)
REQ_BODY
(
WITH_LEN
)
REQ_BODY
(
TAKEN
)
REQ_BODY
(
CACHED
)
REQ_BODY
(
FAIL
)
...
...
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