Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
unique-xids
Commits
06e1b51d
Commit
06e1b51d
authored
Jan 21, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a function to test if the input gzip buffer is empty.
parent
1165eddd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
cache.h
bin/varnishd/cache.h
+3
-2
cache_gzip.c
bin/varnishd/cache_gzip.c
+10
-2
No files found.
bin/varnishd/cache.h
View file @
06e1b51d
...
@@ -627,8 +627,9 @@ void Fetch_Init(void);
...
@@ -627,8 +627,9 @@ void Fetch_Init(void);
struct
vgz
;
struct
vgz
;
struct
vgz
*
VGZ_NewUngzip
(
const
struct
sess
*
sp
,
struct
ws
*
tmp
);
struct
vgz
*
VGZ_NewUngzip
(
const
struct
sess
*
sp
,
struct
ws
*
tmp
);
void
VGZ_Ibuf
(
struct
vgz
*
,
const
void
*
,
size_t
len
);
void
VGZ_Ibuf
(
struct
vgz
*
,
const
void
*
,
ssize_t
len
);
void
VGZ_Obuf
(
struct
vgz
*
,
const
void
*
,
size_t
len
);
int
VGZ_IbufEmpty
(
struct
vgz
*
vg
);
void
VGZ_Obuf
(
struct
vgz
*
,
const
void
*
,
ssize_t
len
);
int
VGZ_Gzip
(
struct
vgz
*
,
const
void
**
,
size_t
*
len
,
int
flag
);
int
VGZ_Gzip
(
struct
vgz
*
,
const
void
**
,
size_t
*
len
,
int
flag
);
int
VGZ_Gunzip
(
struct
vgz
*
,
const
void
**
,
size_t
*
len
);
int
VGZ_Gunzip
(
struct
vgz
*
,
const
void
**
,
size_t
*
len
);
void
VGZ_Destroy
(
struct
vgz
**
);
void
VGZ_Destroy
(
struct
vgz
**
);
...
...
bin/varnishd/cache_gzip.c
View file @
06e1b51d
...
@@ -190,7 +190,7 @@ VGZ_NewGzip(const struct sess *sp, struct ws *tmp)
...
@@ -190,7 +190,7 @@ VGZ_NewGzip(const struct sess *sp, struct ws *tmp)
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
void
void
VGZ_Ibuf
(
struct
vgz
*
vg
,
const
void
*
ptr
,
size_t
len
)
VGZ_Ibuf
(
struct
vgz
*
vg
,
const
void
*
ptr
,
s
s
ize_t
len
)
{
{
CHECK_OBJ_NOTNULL
(
vg
,
VGZ_MAGIC
);
CHECK_OBJ_NOTNULL
(
vg
,
VGZ_MAGIC
);
...
@@ -200,10 +200,18 @@ VGZ_Ibuf(struct vgz *vg, const void *ptr, size_t len)
...
@@ -200,10 +200,18 @@ VGZ_Ibuf(struct vgz *vg, const void *ptr, size_t len)
vg
->
vz
.
avail_in
=
len
;
vg
->
vz
.
avail_in
=
len
;
}
}
int
VGZ_IbufEmpty
(
struct
vgz
*
vg
)
{
CHECK_OBJ_NOTNULL
(
vg
,
VGZ_MAGIC
);
return
(
vg
->
vz
.
avail_in
==
0
);
}
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
void
void
VGZ_Obuf
(
struct
vgz
*
vg
,
const
void
*
ptr
,
size_t
len
)
VGZ_Obuf
(
struct
vgz
*
vg
,
const
void
*
ptr
,
s
s
ize_t
len
)
{
{
CHECK_OBJ_NOTNULL
(
vg
,
VGZ_MAGIC
);
CHECK_OBJ_NOTNULL
(
vg
,
VGZ_MAGIC
);
...
...
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