Commit be21c60c authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Make the gzip_stack_buffer parameter have units of bytes for consistency.

parent fba14565
...@@ -239,7 +239,7 @@ ESI_Deliver(struct sess *sp) ...@@ -239,7 +239,7 @@ ESI_Deliver(struct sess *sp)
uint8_t tailbuf[8 + 5]; uint8_t tailbuf[8 + 5];
int isgzip; int isgzip;
struct vgz *vgz = NULL; struct vgz *vgz = NULL;
char obuf[1024 * params->gzip_stack_buffer]; char obuf[params->gzip_stack_buffer];
ssize_t obufl = 0; ssize_t obufl = 0;
size_t dl; size_t dl;
const void *dp; const void *dp;
......
...@@ -101,7 +101,7 @@ vfp_esi_bytes_gu(struct sess *sp, struct http_conn *htc, ssize_t bytes) ...@@ -101,7 +101,7 @@ vfp_esi_bytes_gu(struct sess *sp, struct http_conn *htc, ssize_t bytes)
{ {
struct vgz *vg; struct vgz *vg;
ssize_t w; ssize_t w;
uint8_t ibuf[1024 * params->gzip_stack_buffer]; uint8_t ibuf[params->gzip_stack_buffer];
int i; int i;
size_t dl; size_t dl;
const void *dp; const void *dp;
...@@ -211,7 +211,7 @@ static int __match_proto__() ...@@ -211,7 +211,7 @@ static int __match_proto__()
vfp_esi_bytes_ug(struct sess *sp, struct http_conn *htc, ssize_t bytes) vfp_esi_bytes_ug(struct sess *sp, struct http_conn *htc, ssize_t bytes)
{ {
ssize_t w; ssize_t w;
char ibuf[1024 * params->gzip_stack_buffer]; char ibuf[params->gzip_stack_buffer];
struct vef_priv *vef; struct vef_priv *vef;
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
...@@ -247,8 +247,8 @@ static int __match_proto__() ...@@ -247,8 +247,8 @@ static int __match_proto__()
vfp_esi_bytes_gg(struct sess *sp, struct http_conn *htc, size_t bytes) vfp_esi_bytes_gg(struct sess *sp, struct http_conn *htc, size_t bytes)
{ {
ssize_t w; ssize_t w;
char ibuf[1024 * params->gzip_stack_buffer]; char ibuf[params->gzip_stack_buffer];
char ibuf2[1024 * params->gzip_stack_buffer]; char ibuf2[params->gzip_stack_buffer];
struct vef_priv *vef; struct vef_priv *vef;
size_t dl; size_t dl;
const void *dp; const void *dp;
......
...@@ -368,7 +368,7 @@ vfp_gunzip_bytes(struct sess *sp, struct http_conn *htc, ssize_t bytes) ...@@ -368,7 +368,7 @@ vfp_gunzip_bytes(struct sess *sp, struct http_conn *htc, ssize_t bytes)
struct vgz *vg; struct vgz *vg;
ssize_t l, w; ssize_t l, w;
int i = -100; int i = -100;
uint8_t ibuf[1024 * params->gzip_stack_buffer]; uint8_t ibuf[params->gzip_stack_buffer];
size_t dl; size_t dl;
const void *dp; const void *dp;
...@@ -437,7 +437,7 @@ vfp_gzip_bytes(struct sess *sp, struct http_conn *htc, ssize_t bytes) ...@@ -437,7 +437,7 @@ vfp_gzip_bytes(struct sess *sp, struct http_conn *htc, ssize_t bytes)
struct vgz *vg; struct vgz *vg;
ssize_t l, w; ssize_t l, w;
int i = -100; int i = -100;
uint8_t ibuf[1024 * params->gzip_stack_buffer]; uint8_t ibuf[params->gzip_stack_buffer];
size_t dl; size_t dl;
const void *dp; const void *dp;
...@@ -513,7 +513,7 @@ vfp_testgzip_bytes(struct sess *sp, struct http_conn *htc, ssize_t bytes) ...@@ -513,7 +513,7 @@ vfp_testgzip_bytes(struct sess *sp, struct http_conn *htc, ssize_t bytes)
struct vgz *vg; struct vgz *vg;
ssize_t l, w; ssize_t l, w;
int i = -100; int i = -100;
uint8_t ibuf[1024 * params->gzip_stack_buffer]; uint8_t ibuf[params->gzip_stack_buffer];
size_t dl; size_t dl;
const void *dp; const void *dp;
struct storage *st; struct storage *st;
......
...@@ -247,7 +247,7 @@ res_WriteGunzipObj(struct sess *sp) ...@@ -247,7 +247,7 @@ res_WriteGunzipObj(struct sess *sp)
struct vgz *vg; struct vgz *vg;
const void *dp; const void *dp;
char lenbuf[20]; char lenbuf[20];
char obuf[1024 * params->gzip_stack_buffer]; char obuf[params->gzip_stack_buffer];
size_t dl; size_t dl;
int i; int i;
......
...@@ -818,10 +818,10 @@ static const struct parspec input_parspec[] = { ...@@ -818,10 +818,10 @@ static const struct parspec input_parspec[] = {
EXPERIMENTAL, EXPERIMENTAL,
"on", "bool" }, "on", "bool" },
{ "gzip_stack_buffer", tweak_uint, &master.gzip_stack_buffer, { "gzip_stack_buffer", tweak_uint, &master.gzip_stack_buffer,
4, UINT_MAX, 2048, UINT_MAX,
"Size of stack buffer used for gzip processing.\n", "Size of stack buffer used for gzip processing.\n",
EXPERIMENTAL, EXPERIMENTAL,
"64", "Kilobytes" }, "32768", "Bytes" },
{ "critbit_cooloff", tweak_timeout_double, { "critbit_cooloff", tweak_timeout_double,
&master.critbit_cooloff, 60, 254, &master.critbit_cooloff, 60, 254,
"How long time the critbit hasher keeps deleted objheads " "How long time the critbit hasher keeps deleted objheads "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment