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
95e9092e
Commit
95e9092e
authored
Aug 11, 2014
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Incrementally chip away at struct object
parent
be938d34
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
6 deletions
+8
-6
cache_fetch.c
bin/varnishd/cache/cache_fetch.c
+2
-1
cache_http1_deliver.c
bin/varnishd/cache/cache_http1_deliver.c
+1
-1
cache_obj.c
bin/varnishd/cache/cache_obj.c
+4
-0
stevedore.c
bin/varnishd/storage/stevedore.c
+1
-4
No files found.
bin/varnishd/cache/cache_fetch.c
View file @
95e9092e
...
...
@@ -159,7 +159,8 @@ vbf_beresp2obj(struct busyobj *bo)
obj
->
oa_http
=
HTTP_Encode
(
bo
->
beresp
,
bo
->
ws_o
,
bo
->
uncacheable
?
HTTPH_R_PASS
:
HTTPH_A_INS
);
AN
(
obj
->
oa_http
);
AZ
(
HTTP_Decode
(
obj
->
http
,
obj
->
oa_http
));
AZ
(
HTTP_Decode
(
obj
->
http
,
ObjGetattr
(
bo
->
fetch_objcore
,
bo
->
stats
,
OA_HEADERS
,
NULL
)));
if
(
http_GetHdr
(
bo
->
beresp
,
H_Last_Modified
,
&
b
))
AZ
(
ObjSetDouble
(
bo
->
fetch_objcore
,
bo
->
stats
,
OA_LASTMODIFIED
,
...
...
bin/varnishd/cache/cache_http1_deliver.c
View file @
95e9092e
...
...
@@ -92,7 +92,7 @@ v1d_dorange(struct req *req, struct busyobj *bo, const char *r)
ssize_t
len
,
low
,
high
,
has_low
;
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
CHECK_OBJ_NOTNULL
(
req
->
obj
,
OBJECT
_MAGIC
);
CHECK_OBJ_NOTNULL
(
req
->
obj
core
,
OBJCORE
_MAGIC
);
assert
(
http_IsStatus
(
req
->
resp
,
200
));
/* We must snapshot the length if we're streaming from the backend */
...
...
bin/varnishd/cache/cache_obj.c
View file @
95e9092e
...
...
@@ -236,6 +236,9 @@ ObjGetattr(struct objcore *oc, struct dstat *ds, enum obj_attr attr,
case
OA_GZIPBITS
:
*
len
=
sizeof
o
->
oa_gzipbits
;
return
(
o
->
oa_gzipbits
);
case
OA_HEADERS
:
*
len
=
0
;
// XXX: hack
return
(
o
->
oa_http
);
case
OA_LASTMODIFIED
:
*
len
=
sizeof
o
->
oa_lastmodified
;
return
(
o
->
oa_lastmodified
);
...
...
@@ -256,6 +259,7 @@ ObjSetattr(struct objcore *oc, struct dstat *ds, enum obj_attr attr,
ssize_t
len
)
{
struct
object
*
o
;
CHECK_OBJ_NOTNULL
(
oc
,
OBJCORE_MAGIC
);
AN
(
ds
);
o
=
ObjGetObj
(
oc
,
ds
);
...
...
bin/varnishd/storage/stevedore.c
View file @
95e9092e
...
...
@@ -187,7 +187,6 @@ stv_alloc_obj(const struct vfp_ctx *vc, size_t size)
struct
storage
*
st
=
NULL
;
struct
stevedore
*
stv
;
unsigned
fail
;
struct
object
*
obj
;
/*
* Always use the stevedore which allocated the object in order to
...
...
@@ -196,9 +195,7 @@ stv_alloc_obj(const struct vfp_ctx *vc, size_t size)
CHECK_OBJ_NOTNULL
(
vc
,
VFP_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
vc
->
bo
,
BUSYOBJ_MAGIC
);
AN
(
vc
->
bo
->
stats
);
obj
=
vc
->
bo
->
fetch_obj
;
CHECK_OBJ_NOTNULL
(
obj
,
OBJECT_MAGIC
);
stv
=
obj
->
body
->
stevedore
;
stv
=
vc
->
body
->
stevedore
;
CHECK_OBJ_NOTNULL
(
stv
,
STEVEDORE_MAGIC
);
if
(
size
>
cache_param
->
fetch_maxchunksize
)
...
...
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