From 00b019b8902e9d319d855b9156f97f931923331c Mon Sep 17 00:00:00 2001 From: default Date: Sat, 9 Mar 2024 08:32:20 +0100 Subject: Backport from xs. --- xs_fcgi.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'xs_fcgi.h') diff --git a/xs_fcgi.h b/xs_fcgi.h index 3bf21ee..4727c5c 100644 --- a/xs_fcgi.h +++ b/xs_fcgi.h @@ -293,7 +293,6 @@ void xs_fcgi_response(FILE *f, int status, xs_dict *headers, xs_str *body, int b struct fcgi_record_header hdr = {0}; struct fcgi_end_request ereq = {0}; xs *out = xs_str_new(NULL); - xs_dict *p; xs_str *k; xs_str *v; @@ -307,8 +306,8 @@ void xs_fcgi_response(FILE *f, int status, xs_dict *headers, xs_str *body, int b out = xs_str_cat(out, s1); } - p = headers; - while (xs_dict_iter(&p, &k, &v)) { + int c = 0; + while (xs_dict_next(headers, &k, &v, &c)) { xs *s1 = xs_fmt("%s: %s\r\n", k, v); out = xs_str_cat(out, s1); } -- cgit