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
3cea8945
Commit
3cea8945
authored
Jun 14, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce RFC2616_Do_Cond() arg from sp to req
parent
14b7e6e9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
10 deletions
+10
-10
cache.h
bin/varnishd/cache/cache.h
+1
-1
cache_center.c
bin/varnishd/cache/cache_center.c
+1
-1
cache_response.c
bin/varnishd/cache/cache_response.c
+1
-1
cache_rfc2616.c
bin/varnishd/cache/cache_rfc2616.c
+7
-7
No files found.
bin/varnishd/cache/cache.h
View file @
3cea8945
...
...
@@ -1015,7 +1015,7 @@ char *WS_Snapshot(struct ws *ws);
void
RFC2616_Ttl
(
struct
busyobj
*
,
unsigned
xid
);
enum
body_status
RFC2616_Body
(
struct
busyobj
*
,
struct
dstat
*
);
unsigned
RFC2616_Req_Gzip
(
const
struct
http
*
);
int
RFC2616_Do_Cond
(
const
struct
sess
*
sp
);
int
RFC2616_Do_Cond
(
const
struct
req
*
sp
);
/* stevedore.c */
struct
object
*
STV_NewObject
(
struct
busyobj
*
,
struct
objcore
**
,
...
...
bin/varnishd/cache/cache_center.c
View file @
3cea8945
...
...
@@ -880,7 +880,7 @@ cnt_fetchbody(struct sess *sp, struct worker *wrk, struct req *req)
*/
if
(
req
->
obj
->
response
==
200
&&
req
->
http
->
conds
&&
RFC2616_Do_Cond
(
sp
))
RFC2616_Do_Cond
(
req
))
bo
->
do_stream
=
0
;
/*
...
...
bin/varnishd/cache/cache_response.c
View file @
3cea8945
...
...
@@ -128,7 +128,7 @@ RES_BuildHttp(const struct sess *sp)
http_Unset
(
req
->
resp
,
H_Content_Encoding
);
if
(
req
->
obj
->
response
==
200
&&
req
->
http
->
conds
&&
RFC2616_Do_Cond
(
sp
))
{
&&
req
->
http
->
conds
&&
RFC2616_Do_Cond
(
req
))
{
req
->
wantbody
=
0
;
http_SetResp
(
req
->
resp
,
"HTTP/1.1"
,
304
,
"Not Modified"
);
http_Unset
(
req
->
resp
,
H_Content_Length
);
...
...
bin/varnishd/cache/cache_rfc2616.c
View file @
3cea8945
...
...
@@ -310,7 +310,7 @@ RFC2616_Req_Gzip(const struct http *hp)
/*--------------------------------------------------------------------*/
int
RFC2616_Do_Cond
(
const
struct
sess
*
sp
)
RFC2616_Do_Cond
(
const
struct
req
*
req
)
{
char
*
p
,
*
e
;
double
ims
;
...
...
@@ -319,19 +319,19 @@ RFC2616_Do_Cond(const struct sess *sp)
/* RFC 2616 13.3.4 states we need to match both ETag
and If-Modified-Since if present*/
if
(
http_GetHdr
(
sp
->
req
->
http
,
H_If_Modified_Since
,
&
p
)
)
{
if
(
!
sp
->
req
->
obj
->
last_modified
)
if
(
http_GetHdr
(
req
->
http
,
H_If_Modified_Since
,
&
p
)
)
{
if
(
!
req
->
obj
->
last_modified
)
return
(
0
);
ims
=
VTIM_parse
(
p
);
if
(
ims
>
sp
->
req
->
t_req
)
/* [RFC2616 14.25] */
if
(
ims
>
req
->
t_req
)
/* [RFC2616 14.25] */
return
(
0
);
if
(
sp
->
req
->
obj
->
last_modified
>
ims
)
if
(
req
->
obj
->
last_modified
>
ims
)
return
(
0
);
do_cond
=
1
;
}
if
(
http_GetHdr
(
sp
->
req
->
http
,
H_If_None_Match
,
&
p
)
&&
http_GetHdr
(
sp
->
req
->
obj
->
http
,
H_ETag
,
&
e
))
{
if
(
http_GetHdr
(
req
->
http
,
H_If_None_Match
,
&
p
)
&&
http_GetHdr
(
req
->
obj
->
http
,
H_ETag
,
&
e
))
{
if
(
strcmp
(
p
,
e
)
!=
0
)
return
(
0
);
do_cond
=
1
;
...
...
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