diff options
| author | 2024-03-09 08:32:20 +0100 | |
|---|---|---|
| committer | 2024-03-09 08:32:20 +0100 | |
| commit | 00b019b8902e9d319d855b9156f97f931923331c (patch) | |
| tree | 3d17736c3884f119b3e223947bea31b6f5953ce1 /xs_fcgi.h | |
| parent | Backport from xs. (diff) | |
| download | penes-snac2-00b019b8902e9d319d855b9156f97f931923331c.tar.gz penes-snac2-00b019b8902e9d319d855b9156f97f931923331c.tar.xz penes-snac2-00b019b8902e9d319d855b9156f97f931923331c.zip | |
Backport from xs.
Diffstat (limited to 'xs_fcgi.h')
| -rw-r--r-- | xs_fcgi.h | 5 |
1 files changed, 2 insertions, 3 deletions
| @@ -293,7 +293,6 @@ void xs_fcgi_response(FILE *f, int status, xs_dict *headers, xs_str *body, int b | |||
| 293 | struct fcgi_record_header hdr = {0}; | 293 | struct fcgi_record_header hdr = {0}; |
| 294 | struct fcgi_end_request ereq = {0}; | 294 | struct fcgi_end_request ereq = {0}; |
| 295 | xs *out = xs_str_new(NULL); | 295 | xs *out = xs_str_new(NULL); |
| 296 | xs_dict *p; | ||
| 297 | xs_str *k; | 296 | xs_str *k; |
| 298 | xs_str *v; | 297 | xs_str *v; |
| 299 | 298 | ||
| @@ -307,8 +306,8 @@ void xs_fcgi_response(FILE *f, int status, xs_dict *headers, xs_str *body, int b | |||
| 307 | out = xs_str_cat(out, s1); | 306 | out = xs_str_cat(out, s1); |
| 308 | } | 307 | } |
| 309 | 308 | ||
| 310 | p = headers; | 309 | int c = 0; |
| 311 | while (xs_dict_iter(&p, &k, &v)) { | 310 | while (xs_dict_next(headers, &k, &v, &c)) { |
| 312 | xs *s1 = xs_fmt("%s: %s\r\n", k, v); | 311 | xs *s1 = xs_fmt("%s: %s\r\n", k, v); |
| 313 | out = xs_str_cat(out, s1); | 312 | out = xs_str_cat(out, s1); |
| 314 | } | 313 | } |