[master] f52ce7344 polish
Nils Goroll
nils.goroll at uplex.de
Fri Feb 22 10:38:07 UTC 2019
commit f52ce7344c5fd4547dd28d98820a4c6111494af6
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Fri Feb 22 11:24:31 2019 +0100
polish
diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c
index 0c136cfd1..57da440de 100644
--- a/bin/varnishtest/vtc_http.c
+++ b/bin/varnishtest/vtc_http.c
@@ -594,17 +594,16 @@ static void
http_swallow_body(struct http *hp, char * const *hh, int body)
{
char *p;
- int i, l, ll;
+ int i, l;
- ll = 0;
p = http_find_header(hh, "transfer-encoding");
if (p != NULL && !strcasecmp(p, "chunked")) {
while (http_rxchunk(hp) > 0)
continue;
- vtc_dump(hp->vl, 4, "body", hp->body, ll);
- ll = hp->rxbuf + hp->prxbuf - hp->body;
- hp->bodyl = ll;
- bprintf(hp->bodylen, "%d", ll);
+ l = hp->rxbuf + hp->prxbuf - hp->body;
+ vtc_dump(hp->vl, 4, "body", hp->body, l);
+ hp->bodyl = l;
+ bprintf(hp->bodylen, "%d", l);
return;
}
p = http_find_header(hh, "content-length");
@@ -617,17 +616,18 @@ http_swallow_body(struct http *hp, char * const *hh, int body)
bprintf(hp->bodylen, "%d", l);
return;
}
+ l = 0;
if (body) {
do {
i = http_rxchar(hp, 1, 1);
if (i < 0)
return;
- ll += i;
+ l += i;
} while (i > 0);
- vtc_dump(hp->vl, 4, "rxeof", hp->body, ll);
+ vtc_dump(hp->vl, 4, "rxeof", hp->body, l);
}
- hp->bodyl = ll;
- bprintf(hp->bodylen, "%d", ll);
+ hp->bodyl = l;
+ bprintf(hp->bodylen, "%d", l);
}
/**********************************************************************
@@ -1764,7 +1764,7 @@ cmd_http_settings(CMD_ARGS)
static void
cmd_http_stream(CMD_ARGS)
{
- struct http *hp = (struct http *)priv;
+ struct http *hp;
CAST_OBJ_NOTNULL(hp, priv, HTTP_MAGIC);
if (!hp->h2) {
vtc_log(hp->vl, 4, "Not in H/2 mode, do what's needed");
More information about the varnish-commit
mailing list