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
d0d20077
Commit
d0d20077
authored
Dec 13, 2018
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the http->conds microoptimization, it does not save anything
any more.
parent
7ccd8e60
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
4 additions
and
12 deletions
+4
-12
cache.h
bin/varnishd/cache/cache.h
+0
-1
cache_esi_deliver.c
bin/varnishd/cache/cache_esi_deliver.c
+0
-1
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+1
-3
cache_rfc2616.c
bin/varnishd/cache/cache_rfc2616.c
+3
-0
cache_http1_proto.c
bin/varnishd/http1/cache_http1_proto.c
+0
-6
cache_http2_proto.c
bin/varnishd/http2/cache_http2_proto.c
+0
-1
No files found.
bin/varnishd/cache/cache.h
View file @
d0d20077
...
@@ -165,7 +165,6 @@ struct http {
...
@@ -165,7 +165,6 @@ struct http {
struct
ws
*
ws
;
struct
ws
*
ws
;
uint16_t
status
;
uint16_t
status
;
uint8_t
protover
;
uint8_t
protover
;
uint8_t
conds
;
/* If-* headers present */
};
};
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
...
...
bin/varnishd/cache/cache_esi_deliver.c
View file @
d0d20077
...
@@ -142,7 +142,6 @@ ved_include(struct req *preq, const char *src, const char *host,
...
@@ -142,7 +142,6 @@ ved_include(struct req *preq, const char *src, const char *host,
HTTP_Setup
(
req
->
http
,
req
->
ws
,
req
->
vsl
,
SLT_ReqMethod
);
HTTP_Setup
(
req
->
http
,
req
->
ws
,
req
->
vsl
,
SLT_ReqMethod
);
HTTP_Copy
(
req
->
http
,
preq
->
http
);
HTTP_Copy
(
req
->
http
,
preq
->
http
);
req
->
http
->
conds
=
0
;
http_SetH
(
req
->
http
,
HTTP_HDR_URL
,
src
);
http_SetH
(
req
->
http
,
HTTP_HDR_URL
,
src
);
if
(
host
!=
NULL
&&
*
host
!=
'\0'
)
{
if
(
host
!=
NULL
&&
*
host
!=
'\0'
)
{
...
...
bin/varnishd/cache/cache_req_fsm.c
View file @
d0d20077
...
@@ -182,9 +182,7 @@ cnt_deliver(struct worker *wrk, struct req *req)
...
@@ -182,9 +182,7 @@ cnt_deliver(struct worker *wrk, struct req *req)
assert
(
wrk
->
handling
==
VCL_RET_DELIVER
);
assert
(
wrk
->
handling
==
VCL_RET_DELIVER
);
if
(
IS_TOPREQ
(
req
)
&&
if
(
IS_TOPREQ
(
req
)
&&
RFC2616_Do_Cond
(
req
))
http_IsStatus
(
req
->
resp
,
200
)
&&
req
->
http
->
conds
&&
RFC2616_Do_Cond
(
req
))
http_PutResponse
(
req
->
resp
,
"HTTP/1.1"
,
304
,
NULL
);
http_PutResponse
(
req
->
resp
,
"HTTP/1.1"
,
304
,
NULL
);
req
->
req_step
=
R_STP_TRANSMIT
;
req
->
req_step
=
R_STP_TRANSMIT
;
...
...
bin/varnishd/cache/cache_rfc2616.c
View file @
d0d20077
...
@@ -260,6 +260,9 @@ RFC2616_Do_Cond(const struct req *req)
...
@@ -260,6 +260,9 @@ RFC2616_Do_Cond(const struct req *req)
const
char
*
p
,
*
e
;
const
char
*
p
,
*
e
;
vtim_real
ims
,
lm
;
vtim_real
ims
,
lm
;
if
(
!
http_IsStatus
(
req
->
resp
,
200
))
return
(
0
);
/*
/*
* We MUST ignore If-Modified-Since if we have an If-None-Match
* We MUST ignore If-Modified-Since if we have an If-None-Match
* header [RFC7232 3.3 p16].
* header [RFC7232 3.3 p16].
...
...
bin/varnishd/http1/cache_http1_proto.c
View file @
d0d20077
...
@@ -115,7 +115,6 @@ http1_dissect_hdrs(struct http *hp, char *p, struct http_conn *htc,
...
@@ -115,7 +115,6 @@ http1_dissect_hdrs(struct http *hp, char *p, struct http_conn *htc,
assert
(
p
>
htc
->
rxbuf_b
);
assert
(
p
>
htc
->
rxbuf_b
);
assert
(
p
<=
htc
->
rxbuf_e
);
assert
(
p
<=
htc
->
rxbuf_e
);
hp
->
nhd
=
HTTP_HDR_FIRST
;
hp
->
nhd
=
HTTP_HDR_FIRST
;
hp
->
conds
=
0
;
r
=
NULL
;
/* For FlexeLint */
r
=
NULL
;
/* For FlexeLint */
for
(;
p
<
htc
->
rxbuf_e
;
p
=
r
)
{
for
(;
p
<
htc
->
rxbuf_e
;
p
=
r
)
{
...
@@ -173,11 +172,6 @@ http1_dissect_hdrs(struct http *hp, char *p, struct http_conn *htc,
...
@@ -173,11 +172,6 @@ http1_dissect_hdrs(struct http *hp, char *p, struct http_conn *htc,
return
(
400
);
return
(
400
);
}
}
if
((
p
[
0
]
==
'i'
||
p
[
0
]
==
'I'
)
&&
(
p
[
1
]
==
'f'
||
p
[
1
]
==
'F'
)
&&
p
[
2
]
==
'-'
)
hp
->
conds
=
1
;
while
(
q
>
p
&&
vct_issp
(
q
[
-
1
]))
while
(
q
>
p
&&
vct_issp
(
q
[
-
1
]))
q
--
;
q
--
;
*
q
=
'\0'
;
*
q
=
'\0'
;
...
...
bin/varnishd/http2/cache_http2_proto.c
View file @
d0d20077
...
@@ -535,7 +535,6 @@ h2_do_req(struct worker *wrk, void *priv)
...
@@ -535,7 +535,6 @@ h2_do_req(struct worker *wrk, void *priv)
CAST_OBJ_NOTNULL
(
r2
,
req
->
transport_priv
,
H2_REQ_MAGIC
);
CAST_OBJ_NOTNULL
(
r2
,
req
->
transport_priv
,
H2_REQ_MAGIC
);
THR_SetRequest
(
req
);
THR_SetRequest
(
req
);
req
->
http
->
conds
=
1
;
wrk
->
stats
->
client_req
++
;
wrk
->
stats
->
client_req
++
;
if
(
CNT_Request
(
wrk
,
req
)
!=
REQ_FSM_DISEMBARK
)
{
if
(
CNT_Request
(
wrk
,
req
)
!=
REQ_FSM_DISEMBARK
)
{
AZ
(
req
->
ws
->
r
);
AZ
(
req
->
ws
->
r
);
...
...
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