mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-12 21:10:22 +03:00
In xs_fcgi_response(), don't add the b_size to the total size if body is NULL.
This commit is contained in:
parent
7c2e2902cc
commit
ecdb5aced8
@ -324,15 +324,16 @@ void xs_fcgi_response(FILE *f, int status, xs_dict *headers, xs_str *body, int b
|
|||||||
int size = strlen(out);
|
int size = strlen(out);
|
||||||
|
|
||||||
/* add the body */
|
/* add the body */
|
||||||
if (body != NULL && b_size > 0)
|
if (body != NULL && b_size > 0) {
|
||||||
out = xs_append_m(out, body, b_size);
|
out = xs_append_m(out, body, b_size);
|
||||||
|
size += b_size;
|
||||||
|
}
|
||||||
|
|
||||||
/* now send all the STDOUT in packets */
|
/* now send all the STDOUT in packets */
|
||||||
hdr.version = FCGI_VERSION_1;
|
hdr.version = FCGI_VERSION_1;
|
||||||
hdr.type = FCGI_STDOUT;
|
hdr.type = FCGI_STDOUT;
|
||||||
hdr.id = fcgi_id;
|
hdr.id = fcgi_id;
|
||||||
|
|
||||||
size += b_size;
|
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
|
|
||||||
while (offset < size) {
|
while (offset < size) {
|
||||||
|
Loading…
Reference in New Issue
Block a user