From beee4d129bdeca83c9f41ee4974c4af3f8794c80 Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Wed, 15 Jun 2022 16:13:34 +0300 Subject: [PATCH] Fix producing headers (so that nginx understands them) --- webserver/doskast-trigger-connect.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/webserver/doskast-trigger-connect.c b/webserver/doskast-trigger-connect.c index 0bbea4d..5339999 100644 --- a/webserver/doskast-trigger-connect.c +++ b/webserver/doskast-trigger-connect.c @@ -154,10 +154,11 @@ main(){ http_code = HTTP_OK; fcgi_out: cgiFree(cgi); - printf("Status: %d\n", http_code); - printf("Content-Type: text/plain; charset=utf-8\n"); + printf("Content-Type: text/plain; charset=utf-8\r\n"); + printf("Status: %d\r\n", http_code); + printf("\r\n", http_code); if (http_code == HTTP_OK) { - printf("%s\n", "OK"); + printf("%s\r\n", "OK"); rc = 0; } else { rc = 1;