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
70ba8e03
Commit
70ba8e03
authored
Feb 23, 2017
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Send 100-continue after vcl_recv or when caching the request body
whichever comes first
parent
5a0817d1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
3 deletions
+13
-3
cache_req_body.c
bin/varnishd/cache/cache_req_body.c
+5
-0
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+6
-0
cache_http1_fsm.c
bin/varnishd/http1/cache_http1_fsm.c
+1
-3
req_flags.h
include/tbl/req_flags.h
+1
-0
No files found.
bin/varnishd/cache/cache_req_body.c
View file @
70ba8e03
...
...
@@ -37,6 +37,7 @@
#include "vtim.h"
#include "hash/hash_slinger.h"
#include "storage/storage.h"
#include "cache_transport.h"
/*----------------------------------------------------------------------
* Pull the req.body in via/into a objcore
...
...
@@ -84,6 +85,10 @@ vrb_pull(struct req *req, ssize_t maxsize, objiterate_f *func, void *priv)
AZ
(
req
->
req_bodybytes
);
AN
(
req
->
htc
);
yet
=
req
->
htc
->
content_length
;
if
(
yet
!=
0
&&
req
->
want100cont
)
{
req
->
want100cont
=
0
;
(
void
)
req
->
transport
->
minimal_response
(
req
,
100
);
}
if
(
yet
<
0
)
yet
=
0
;
do
{
...
...
bin/varnishd/cache/cache_req_fsm.c
View file @
70ba8e03
...
...
@@ -747,6 +747,12 @@ cnt_recv(struct worker *wrk, struct req *req)
VCL_recv_method
(
req
->
vcl
,
wrk
,
req
,
NULL
,
NULL
);
}
if
(
req
->
want100cont
)
{
req
->
want100cont
=
0
;
if
(
req
->
transport
->
minimal_response
(
req
,
100
))
return
(
-
1
);
}
/* Attempts to cache req.body may fail */
if
(
req
->
req_body_status
==
REQ_BODY_FAIL
)
{
req
->
doclose
=
SC_RX_BODY
;
...
...
bin/varnishd/http1/cache_http1_fsm.c
View file @
70ba8e03
...
...
@@ -328,9 +328,7 @@ http1_dissect(struct worker *wrk, struct req *req)
wrk
->
stats
->
client_req_417
++
;
return
(
-
1
);
}
http1_simple_response
(
req
,
R_100
);
if
(
req
->
doclose
)
return
(
-
1
);
req
->
want100cont
=
1
;
http_Unset
(
req
->
http
,
H_Expect
);
}
...
...
include/tbl/req_flags.h
View file @
70ba8e03
...
...
@@ -35,6 +35,7 @@ REQ_FLAG(hash_ignore_busy, 1, 1, "")
REQ_FLAG
(
hash_always_miss
,
1
,
1
,
""
)
REQ_FLAG
(
is_hit
,
0
,
0
,
""
)
REQ_FLAG
(
waitinglist
,
0
,
0
,
""
)
REQ_FLAG
(
want100cont
,
0
,
0
,
""
)
#undef REQ_FLAG
/*lint -restore */
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