From 0218e964b0d73340c8d0c5d9e37991359d7c4be9 Mon Sep 17 00:00:00 2001 From: default Date: Fri, 30 Aug 2024 19:10:26 +0200 Subject: Backport from xs. --- xs_httpd.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'xs_httpd.h') diff --git a/xs_httpd.h b/xs_httpd.h index d080b39..1782487 100644 --- a/xs_httpd.h +++ b/xs_httpd.h @@ -105,8 +105,7 @@ void xs_httpd_response(FILE *f, int status, const char *status_text, xs_dict *he proto = xs_fmt("HTTP/1.1 %d %s", status, status_text); fprintf(f, "%s\r\n", proto); - int c = 0; - while (xs_dict_next(headers, &k, &v, &c)) { + xs_dict_foreach(headers, k, v) { fprintf(f, "%s: %s\r\n", k, v); } -- cgit v1.2.3