deflatehd: Require empty line for each HTTP/1 style header set
This commit is contained in:
parent
8915e91b17
commit
c22cb53b5e
|
@ -225,14 +225,18 @@ static int perform_from_http1text(nghttp2_hd_context *deflater)
|
||||||
inputlen += nv->namelen + nv->valuelen;
|
inputlen += nv->namelen + nv->valuelen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!end) {
|
||||||
|
if(seq > 0) {
|
||||||
|
printf(",\n");
|
||||||
|
}
|
||||||
deflate_hd(deflater, nva, nvlen, inputlen, seq);
|
deflate_hd(deflater, nva, nvlen, inputlen, seq);
|
||||||
|
}
|
||||||
|
|
||||||
for(i = 0; i < nvlen; ++i) {
|
for(i = 0; i < nvlen; ++i) {
|
||||||
free(nva[i].name);
|
free(nva[i].name);
|
||||||
free(nva[i].value);
|
free(nva[i].value);
|
||||||
}
|
}
|
||||||
if(end) break;
|
if(end) break;
|
||||||
printf(",\n");
|
|
||||||
++seq;
|
++seq;
|
||||||
}
|
}
|
||||||
printf("]\n");
|
printf("]\n");
|
||||||
|
@ -272,7 +276,8 @@ static void print_help(void)
|
||||||
"]\n"
|
"]\n"
|
||||||
"\n"
|
"\n"
|
||||||
"With -t option, the program can accept more familiar HTTP/1 style\n"
|
"With -t option, the program can accept more familiar HTTP/1 style\n"
|
||||||
"header field block. Each header set is delimited by empty line:\n"
|
"header field block. Each header set must be followed by one empty\n"
|
||||||
|
"line:\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Example:\n"
|
"Example:\n"
|
||||||
":method: GET\n"
|
":method: GET\n"
|
||||||
|
|
Loading…
Reference in New Issue